提交 6ca52227 编写于 作者: L lana

Merge

......@@ -49,6 +49,10 @@ import java.util.Iterator;
public abstract class XMLEventFactory {
protected XMLEventFactory(){}
static final String JAXPFACTORYID = "javax.xml.stream.XMLEventFactory";
static final String DEFAULIMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
/**
* Create a new instance of the factory
* @throws FactoryConfigurationError if an instance of this factory cannot be loaded
......@@ -57,8 +61,8 @@ public abstract class XMLEventFactory {
throws FactoryConfigurationError
{
return (XMLEventFactory) FactoryFinder.find(
"javax.xml.stream.XMLEventFactory",
"com.sun.xml.internal.stream.events.XMLEventFactoryImpl");
JAXPFACTORYID,
DEFAULIMPL);
}
/**
......@@ -90,8 +94,8 @@ public abstract class XMLEventFactory {
throws FactoryConfigurationError
{
return (XMLEventFactory) FactoryFinder.find(
"javax.xml.stream.XMLEventFactory",
"com.sun.xml.internal.stream.events.XMLEventFactoryImpl");
JAXPFACTORYID,
DEFAULIMPL);
}
/**
......@@ -114,7 +118,7 @@ public abstract class XMLEventFactory {
throws FactoryConfigurationError {
try {
//do not fallback if given classloader can't find the class, throw exception
return (XMLEventFactory) FactoryFinder.newInstance(factoryId, classLoader, false);
return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, null);
} catch (FactoryFinder.ConfigurationError e) {
throw new FactoryConfigurationError(e.getException(),
e.getMessage());
......@@ -141,7 +145,7 @@ public abstract class XMLEventFactory {
throws FactoryConfigurationError {
try {
//do not fallback if given classloader can't find the class, throw exception
return (XMLEventFactory) FactoryFinder.newInstance(factoryId, classLoader, false);
return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, null);
} catch (FactoryFinder.ConfigurationError e) {
throw new FactoryConfigurationError(e.getException(),
e.getMessage());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册