if (factoryClassName == null) { logger .log( Level.SEVERE, "Unable to register the Restlet API implementation. Please check that the JAR file is in your classpath."); } else {
}
	public static Factory getInstance()	{		Factory result = instance;		if (result == null)		{			// Find the factory class name			String factoryClassName = null;			// Try the default classloader			ClassLoader cl = getClassLoader();			URL configURL = cl.getResource(providerResource);			if (configURL == null)			{				// Try the current thread's classloader				cl = Thread.currentThread().getContextClassLoader();				configURL = cl.getResource(providerResource);			}			if (configURL == null)			{				// Try the system classloader				cl = ClassLoader.getSystemClassLoader();				configURL = cl.getResource(providerResource);			}			if (configURL != null)			{				try				{					BufferedReader reader = new BufferedReader(new InputStreamReader(configURL							.openStream(), "utf-8"));					String providerName = reader.readLine();					factoryClassName = providerName.substring(0, providerName.indexOf('#'))							.trim();				}				catch (Exception e)				{					// Exception during resolution				}			}			if (factoryClassName == null)			{				logger						.log(								Level.SEVERE,								"Unable to register the Restlet API implementation. Please check that the JAR file is in your classpath.");			}			else			{				// Instantiate the factory				try				{					instance = (Factory) Class.forName(factoryClassName).newInstance();					result = instance;				}				catch (Exception e)				{					logger.log(Level.SEVERE,							"Unable to register the Restlet API implementation", e);					throw new RuntimeException(							"Unable to register the Restlet API implementation");				}			}		}		return result;	}