Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-813

MarkerManager Log4jMarker.hasParents() returns opposite of correct result

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1
    • Component/s: API
    • Labels:

      Description

      Log4JMarker.hasParents() will return false when the marker has parents, and true when it has none.

      The javadoc in the Marker interface indicates it should function the other way around:

      "Indicates whether this Marker has references to any other Markers. Return true if the Marker has parent Markers"

      The code for the implementation (that I could find) demonstrates that it would function in the opposite way as it is described in that javadoc:

      @Override 
      public boolean hasParents() { 
           return this.parents == null; 
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              erichsend David Erichsen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: