When there are 2 PMD warnings on 1 line the Jenkins report does only report 1

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: pmd-plugin
    • None

      We have this line of code:

      public boolean hasNext()
      {
      	return cursor == EMPTY && entity != EMPTY;
      }
      

      PMD xml report has these violations reported:

      <violation beginline="216" endline="216" begincolumn="32" endcolumn="46" rule="CompareObjectsWithEquals" ruleset="Design Rules" package="com.myapplication.util.collections" class="SingleSet$SingleSetIterator" method="hasNext" externalInfoUrl="http://pmd.sourceforge.net/rules/design.html#CompareObjectsWithEquals" priority="3">
      Use equals() to compare object references.
      </violation>
      <violation beginline="216" endline="216" begincolumn="51" endcolumn="65" rule="CompareObjectsWithEquals" ruleset="Design Rules" package="com.myapplication.util.collections" class="SingleSet$SingleSetIterator" method="hasNext" externalInfoUrl="http://pmd.sourceforge.net/rules/design.html#CompareObjectsWithEquals" priority="3">
      Use equals() to compare object references.
      </violation>
      

      Is reports 2 issues on the same line. Other begincolumn and other endcolumn.

      In the UI it is only reported once.
      And the total number of violations does not match with the actual number of violations.

            Assignee:
            Ulli Hafner
            Reporter:
            Cees Bos
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: