In debug mode, log message leads to NullPointerException when entityURL is null
-------------------------------------------------------------------------------
Key: DIGESTER-130
URL: https://issues.apache.org/jira/browse/DIGESTER-130
Project: Commons Digester
Issue Type: Bug
Affects Versions: 1.8
Environment: all
Reporter: Volker Karlmeier
Priority: Minor
Index:
/home/volker/workspace/commons-digester/src/java/org/apache/commons/digester/Digester.java
===================================================================
---
/home/volker/workspace/commons-digester/src/java/org/apache/commons/digester/Digester.java
(revision 718060)
+++
/home/volker/workspace/commons-digester/src/java/org/apache/commons/digester/Digester.java
(working copy)
@@ -1599,7 +1599,10 @@
if (systemId == null) {
// cannot resolve
if (log.isDebugEnabled()) {
- log.debug(" Cannot resolve entity: '" + entityURL + "'");
+ if (entityURL == null)
+ log.debug(" Cannot resolve entity: entityURL is
null");
+ else
+ log.debug(" Cannot resolve entity: '" +
entityURL + "'");
}
return (null);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.