--- old/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingParser.java Thu Aug 28 19:10:54 2014 +++ new/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingParser.java Thu Aug 28 19:10:54 2014 @@ -1,17 +1,11 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! - */ -// ResolvingParser.java - An interface for reading catalog files - -/* - * Copyright 2001-2004 The Apache Software Foundation or its licensors, - * as applicable. + * 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 * - * 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 - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -67,17 +61,12 @@ */ public class ResolvingParser implements Parser, DTDHandler, DocumentHandler, EntityResolver { - /** Make the parser Namespace aware? */ - public static boolean namespaceAware = true; - /** Make the parser validating? */ - public static boolean validating = false; - /** Suppress explanatory message? * * @see #parse(InputSource) */ - public static boolean suppressExplanation = false; + private static final boolean suppressExplanation = false; /** The underlying parser. */ private SAXParser saxParser = null; @@ -103,9 +92,6 @@ /** Are we in the prolog? Is an oasis-xml-catalog PI valid now? */ private boolean allowXMLCatalogPI = false; - /** Has an oasis-xml-catalog PI been seen? */ - private boolean oasisXMLCatalogPI = false; - /** The base URI of the input document, if known. */ private URL baseURL = null; @@ -125,8 +111,8 @@ catalogResolver = new CatalogResolver(catalogManager); SAXParserFactory spf = catalogManager.useServicesMechanism() ? SAXParserFactory.newInstance() : new SAXParserFactoryImpl(); - spf.setNamespaceAware(namespaceAware); - spf.setValidating(validating); + spf.setNamespaceAware(true); + spf.setValidating(false); try { saxParser = spf.newSAXParser(); @@ -289,7 +275,6 @@ if (catalog != null) { try { catalogManager.debug.message(4,"oasis-xml-catalog", catalog.toString()); - oasisXMLCatalogPI = true; if (piCatalogResolver == null) { piCatalogResolver = new CatalogResolver(true); @@ -396,7 +381,10 @@ return iSource; } catch (Exception e) { - catalogManager.debug.message(1, "Failed to create InputSource", resolved); + catalogManager.debug.message(1, + "Failed to create InputSource (" + + e.toString() + + ")", resolved); return null; } } else {