Permalink
Browse files

Explicitly set the classloader used by service loader as temporary wo…

…rkaround to get serviceloader working in OSGi environments
  • Loading branch information...
benfortuna committed Apr 28, 2016
1 parent 5c78e49 commit f89a26341d90dda85dd13beaf1d02a61d9eeb2f7
@@ -52,7 +52,7 @@
* Constructor made private to prevent instantiation.
*/
private ComponentFactoryImpl() {
super(ServiceLoader.load(ComponentFactory.class));
super(ServiceLoader.load(ComponentFactory.class, ComponentFactory.class.getClassLoader()));
}
/**
@@ -52,7 +52,7 @@
private static ParameterFactoryImpl instance = new ParameterFactoryImpl();
protected ParameterFactoryImpl() {
super(ServiceLoader.load(ParameterFactory.class));
super(ServiceLoader.load(ParameterFactory.class, ParameterFactory.class.getClassLoader()));
}
/**
@@ -56,7 +56,7 @@
* Constructor made private to prevent instantiation.
*/
protected PropertyFactoryImpl() {
super(ServiceLoader.load(PropertyFactory.class));
super(ServiceLoader.load(PropertyFactory.class, PropertyFactory.class.getClassLoader()));
}
/**

0 comments on commit f89a263

Please sign in to comment.