--- old/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java 2016-07-24 18:45:28.828215881 -0700 +++ new/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java 2016-07-24 18:45:28.752212103 -0700 @@ -1,13 +1,13 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -36,7 +36,6 @@ import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager; import com.sun.org.apache.xerces.internal.util.FeatureState; import com.sun.org.apache.xerces.internal.util.PropertyState; -import com.sun.org.apache.xerces.internal.util.Status; import com.sun.org.apache.xerces.internal.util.SymbolTable; import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; import com.sun.org.apache.xerces.internal.xni.XMLLocator; @@ -49,6 +48,9 @@ import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentScanner; import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; import com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration; +import javax.xml.XMLConstants; +import javax.xml.catalog.CatalogFeatures; +import jdk.xml.internal.JdkXmlUtils; /** * This is the DTD-only parser configuration. It extends the basic @@ -308,6 +310,7 @@ //NOTIFY_BUILTIN_REFS, // from XMLDocumentFragmentScannerImpl //NOTIFY_CHAR_REFS, // from XMLDocumentFragmentScannerImpl //WARN_ON_DUPLICATE_ENTITYDEF, // from XMLEntityManager + XMLConstants.USE_CATALOG }; addRecognizedFeatures(recognizedFeatures); @@ -320,6 +323,7 @@ //setFeature(NOTIFY_BUILTIN_REFS, false); // from XMLDocumentFragmentScannerImpl //setFeature(NOTIFY_CHAR_REFS, false); // from XMLDocumentFragmentScannerImpl //setFeature(WARN_ON_DUPLICATE_ENTITYDEF, false); // from XMLEntityManager + fFeatures.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT); // add default recognized properties final String[] recognizedProperties = { @@ -337,7 +341,11 @@ JAXP_SCHEMA_LANGUAGE, LOCALE, SECURITY_MANAGER, - XML_SECURITY_PROPERTY_MANAGER + XML_SECURITY_PROPERTY_MANAGER, + JdkXmlUtils.CATALOG_DEFER, + JdkXmlUtils.CATALOG_FILES, + JdkXmlUtils.CATALOG_PREFER, + JdkXmlUtils.CATALOG_RESOLVE }; addRecognizedProperties(recognizedProperties); @@ -416,6 +424,11 @@ } setProperty(XML_SECURITY_PROPERTY_MANAGER, new XMLSecurityPropertyManager()); + + // Initialize Catalog features + for( CatalogFeatures.Feature f : CatalogFeatures.Feature.values()) { + setProperty(f.getPropertyName(), null); + } } // (SymbolTable,XMLGrammarPool) //