Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12801

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

    Details

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

      Description

      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.

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: