Commons Digester
  1. Commons Digester
  2. DIGESTER-130

In debug mode, log message leads to NullPointerException when entityURL is null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1, 2.0
    • Labels:
      None
    • Environment:

      all

      Description

      In debug mode, entityURL == null leads to a NullPointerException when logging

      1. digester.patch
        0.9 kB
        Volker Karlmeier

        Issue Links

          Activity

          Volker Karlmeier created issue -
          Volker Karlmeier made changes -
          Field Original Value New Value
          Link This issue relates to DIGESTER-122 [ DIGESTER-122 ]
          Hide
          Volker Karlmeier added a comment -

          Sorry, didn't see this bug was found.
          But the patch may help

          Show
          Volker Karlmeier added a comment - Sorry, didn't see this bug was found. But the patch may help
          Volker Karlmeier made changes -
          Attachment digester.patch [ 12394022 ]
          Volker Karlmeier made changes -
          Description 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);
                           
          In debug mode, entityURL == null leads to a NullPointerException when logging
          Hide
          Rahul Akolkar added a comment -

          Thanks, a similar patch has been applied as part of DIGESTER-122, so marking as fixed.

          Show
          Rahul Akolkar added a comment - Thanks, a similar patch has been applied as part of DIGESTER-122 , so marking as fixed.
          Rahul Akolkar made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0 [ 12313572 ]
          Resolution Fixed [ 1 ]
          Fix Version/s 1.8.1 [ 12312580 ]
          Rahul Akolkar made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Volker Karlmeier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.05h
                0.05h
                Remaining:
                Remaining Estimate - 0.05h
                0.05h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development