Mercurial > hg > openjdk > jdk8 > jaxp
changeset 340:7c2363666890 jdk8-b55
Merge
author | lana |
---|---|
date | Thu, 30 Aug 2012 20:10:34 -0700 |
parents | 0cb5f2471628 (current diff) 933d0234670f (diff) |
children | f19d63b2119a |
files | |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/javax/xml/stream/XMLEventFactory.java Thu Aug 30 10:27:15 2012 -0700 +++ b/src/javax/xml/stream/XMLEventFactory.java Thu Aug 30 20:10:34 2012 -0700 @@ -49,6 +49,10 @@ 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 @@ throws FactoryConfigurationError { return (XMLEventFactory) FactoryFinder.find( - "javax.xml.stream.XMLEventFactory", - "com.sun.xml.internal.stream.events.XMLEventFactoryImpl"); + JAXPFACTORYID, + DEFAULIMPL); } /** @@ -90,8 +94,8 @@ throws FactoryConfigurationError { return (XMLEventFactory) FactoryFinder.find( - "javax.xml.stream.XMLEventFactory", - "com.sun.xml.internal.stream.events.XMLEventFactoryImpl"); + JAXPFACTORYID, + DEFAULIMPL); } /** @@ -114,7 +118,7 @@ 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 @@ 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());