jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Wed Jul 05 22:14:30 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Thu Sep 22 10:17:19 2016 -0700
@@ -1033,12 +1033,12 @@
staxInputSource = new StaxXMLInputSource(xmlInputSource, fISCreatedByResolver);
}
- if (staxInputSource == null) {
+ if (staxInputSource == null && fUseCatalog) {
if (fCatalogFeatures == null) {
fCatalogFeatures = JdkXmlUtils.getCatalogFeatures(fDefer, fCatalogFile, fPrefer, fResolve);
}
fCatalogFile = fCatalogFeatures.get(Feature.FILES);
- if (fUseCatalog && fCatalogFile != null) {
+ if (fCatalogFile != null) {
try {
if (fCatalogResolver == null) {
fCatalogResolver = CatalogManager.catalogResolver(fCatalogFeatures);
@@ -1133,12 +1133,12 @@
xmlInputSource = fEntityResolver.resolveEntity(resourceIdentifier);
}
- if (xmlInputSource == null) {
+ if (xmlInputSource == null && fUseCatalog) {
if (fCatalogFeatures == null) {
fCatalogFeatures = JdkXmlUtils.getCatalogFeatures(fDefer, fCatalogFile, fPrefer, fResolve);
}
fCatalogFile = fCatalogFeatures.get(Feature.FILES);
- if (fUseCatalog && fCatalogFile != null) {
+ if (fCatalogFile != null) {
/*
since the method can be called from various processors, both
EntityResolver and URIResolver are used to attempt to find