From 4914278afba209d2b33fb8d0c79b86c7467235db Mon Sep 17 00:00:00 2001 From: JoeWang-Java Date: Mon, 20 Nov 2023 17:41:42 +0000 Subject: [PATCH] add a note; fix alignment --- .../org/apache/xerces/internal/impl/XMLEntityManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java index 79ea176e8d823..4d74b0e140475 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java @@ -1081,7 +1081,7 @@ private void initJdkCatalogResolver() { private StaxXMLInputSource resolveWithCatalogStAX(CatalogResolver cr, String cFile, String publicId, String systemId) { InputSource is = resolveWithCatalog(cr, cFile, publicId, systemId); -// if (is != null && !is.isEmpty()) { + // note that empty source isn't considered resolved if (is != null) { return new StaxXMLInputSource(new XMLInputSource(is, true), true); } @@ -1099,8 +1099,8 @@ private InputSource resolveWithCatalog(CatalogResolver cr, String cFile, return cr.resolveEntity(publicId, systemId); } catch (CatalogException e) { fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"CatalogException", - new Object[]{SecuritySupport.sanitizePath(cFile)}, - XMLErrorReporter.SEVERITY_FATAL_ERROR, e ); + new Object[]{SecuritySupport.sanitizePath(cFile)}, + XMLErrorReporter.SEVERITY_FATAL_ERROR, e ); } } return null; @@ -1442,7 +1442,7 @@ public void startEntity(boolean isGE, String name, fSecurityManager.debugPrint(fLimitAnalyzer); fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"EntityExpansionLimit", new Object[]{fSecurityManager.getLimitValueByIndex(entityExpansionIndex)}, - XMLErrorReporter.SEVERITY_FATAL_ERROR ); + XMLErrorReporter.SEVERITY_FATAL_ERROR ); // is there anything better to do than reset the counter? // at least one can envision debugging applications where this might // be useful...