diff options
Diffstat (limited to 'bundles/org.eclipse.osgi.util/src/org/osgi/util/xml/XMLParserActivator.java')
-rw-r--r-- | bundles/org.eclipse.osgi.util/src/org/osgi/util/xml/XMLParserActivator.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi.util/src/org/osgi/util/xml/XMLParserActivator.java b/bundles/org.eclipse.osgi.util/src/org/osgi/util/xml/XMLParserActivator.java index 64be3f5cf..a7e84c4ac 100644 --- a/bundles/org.eclipse.osgi.util/src/org/osgi/util/xml/XMLParserActivator.java +++ b/bundles/org.eclipse.osgi.util/src/org/osgi/util/xml/XMLParserActivator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2002, 2015). All Rights Reserved. + * Copyright (c) OSGi Alliance (2002, 2017). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,11 @@ import java.util.Collections; import java.util.Hashtable; import java.util.Iterator; import java.util.List; + import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.FactoryConfigurationError; import javax.xml.parsers.SAXParserFactory; + import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; @@ -421,7 +423,10 @@ public class XMLParserActivator implements BundleActivator, ServiceFactory<Objec */ private Object getFactory(String parserFactoryClassName) throws FactoryConfigurationError { try { - return bundleContext.getBundle().loadClass(parserFactoryClassName).newInstance(); + return bundleContext.getBundle() + .loadClass(parserFactoryClassName) + .getConstructor() + .newInstance(); } catch (RuntimeException e) { throw e; } catch (Exception e) { |