Mercurial > hg > release > icedtea8-forest-3.0 > jaxp
changeset 1217:64598e537c03
Merge
author | asaha |
---|---|
date | Tue, 28 Jul 2015 23:41:19 -0700 |
parents | 140556a0ef49 (current diff) b6ac3a1b7a2c (diff) |
children | c0387d6454a9 |
files | .hgtags |
diffstat | 2 files changed, 19 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Thu Jul 23 11:21:44 2015 -0700 +++ b/.hgtags Tue Jul 28 23:41:19 2015 -0700 @@ -461,6 +461,8 @@ 9f9e85cded9f1891115db7d67d18af223c54f5a7 jdk8u65-b04 977d4ac5561ee94009f70848b1ef7b26230545e0 jdk8u65-b05 f98b8f06a46ad7d7ab19179c8465c2861bf1a7f6 jdk8u65-b06 +977fdc7ce23e19e43eb7353cdecf09b5b7dfeab3 jdk8u65-b07 bc1ad5d83a65339c40a17406ea38d2ea8cbb9807 jdk8u66-b00 0f2ed27c7d793cee4d91591c6a0b1a730e985906 jdk8u66-b01 +096038a770142b0e6501d04d03283165da9661c6 jdk8u66-b02 700dc6c623439c5df98253fba49387919dd8732d jdk8u71-b00
--- a/src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java Thu Jul 23 11:21:44 2015 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java Tue Jul 28 23:41:19 2015 -0700 @@ -20,8 +20,10 @@ package com.sun.org.apache.xerces.internal.impl.dv; +import com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl; +import com.sun.org.apache.xerces.internal.impl.dv.dtd.XML11DTDDVFactoryImpl; +import com.sun.org.apache.xerces.internal.utils.ObjectFactory; import java.util.Map; -import com.sun.org.apache.xerces.internal.utils.ObjectFactory; /** * The factory to create and return DTD types. The implementation should @@ -36,7 +38,11 @@ */ public abstract class DTDDVFactory { - private static final String DEFAULT_FACTORY_CLASS = "com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl"; + private static final String DEFAULT_FACTORY_CLASS = + "com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl"; + + private static final String XML11_DATATYPE_VALIDATOR_FACTORY = + "com.sun.org.apache.xerces.internal.impl.dv.dtd.XML11DTDDVFactoryImpl"; /** * Get an instance of the default DTDDVFactory implementation. @@ -59,9 +65,15 @@ */ public static final DTDDVFactory getInstance(String factoryClass) throws DVFactoryException { try { - // if the class name is not specified, use the default one - return (DTDDVFactory) - (ObjectFactory.newInstance(factoryClass, true)); + if (DEFAULT_FACTORY_CLASS.equals(factoryClass)) { + return new DTDDVFactoryImpl(); + } else if (XML11_DATATYPE_VALIDATOR_FACTORY.equals(factoryClass)) { + return new XML11DTDDVFactoryImpl(); + } else { + //fall back for compatibility + return (DTDDVFactory) + (ObjectFactory.newInstance(factoryClass, true)); + } } catch (ClassCastException e) { throw new DVFactoryException("DTD factory class " + factoryClass + " does not extend from DTDDVFactory.");