/** * Loads an individual Provider implementation. This method is really only useful for the OSGi bundle activator and * this class itself. * * @param url the URL to the provider properties file * @param cl the ClassLoader to load the provider classes with */ protected static void loadProvider(final URL url, final ClassLoader cl) { try { final Properties props = PropertiesUtil.loadClose(url.openStream(), url); if (validVersion(props.getProperty(API_VERSION))) { final Provider provider = new Provider(props, url, cl); PROVIDERS.add(provider); LOGGER.debug("Loaded Provider {}", provider); } } catch (final IOException e) { LOGGER.error("Unable to open {}", url, e); } }
/** * Loads an individual Provider implementation. This method is really only useful for the OSGi bundle activator and * this class itself. * * @param url the URL to the provider properties file * @param cl the ClassLoader to load the provider classes with */ protected static void loadProvider(final URL url, final ClassLoader cl) { try { final Properties props = PropertiesUtil.loadClose(url.openStream(), url); if (validVersion(props.getProperty(API_VERSION))) { final Provider provider = new Provider(props, url, cl); PROVIDERS.add(provider); LOGGER.debug("Loaded Provider {}", provider); } } catch (final IOException e) { LOGGER.error("Unable to open {}", url, e); } }