diff --git a/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java b/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java index 823c02a219faf96796ba552449bd877f766d8a27..1a5c934b18b14546c52e1539ebad3154b74740fb 100644 --- a/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java +++ b/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java @@ -33,6 +33,7 @@ import org.xml.sax.SAXException; import java.io.IOException; import java.net.URL; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -57,7 +58,9 @@ public class XMLEntityResolver extends ParserConfigurator implements EntityResol */ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { if (systemId != null) { - LOGGER.fine("Will try to resolve systemId [" + systemId + "]"); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("Will try to resolve systemId [" + systemId + "]"); + } // TestNG system-ids if (systemId.startsWith(TESTNG_NAMESPACE)) { LOGGER.fine("It's a TestNG document, will try to lookup DTD in classpath");