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

Findbugs reports some warnings as resolved even if this is not true

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • findbugs-plugin
    • None
    • Platform: All, OS: All

      Findbugs sometimes shows that a warning has been solved even if it is not true.
      I think that the problem is in cases when in resulting xml for one bug there are
      more ranges.
      In one build a warning has line ranges 276,268,256 and in next build has
      268,276,256. These is the same warning, the only difference is order of line
      ranges. AFAIK the difference between builds is based on hashes of warnings, then
      I think before building the hash you need to sort these line ranges. Hopefully
      this will remove those alerts.

      Thanks for this wonderfull plugin!

      An example build N:

      <bug>
      <message>Null value is guaranteed to be dereferenced</message>
      <priority>NORMAL</priority>
      <key>23046</key>
      <lineRanges>
      <range>
      <start>276</start>
      <end>276</end>
      </range>
      <range>
      <start>268</start>
      <end>268</end>
      </range>
      <range>
      <start>256</start>
      <end>256</end>
      </range>
      </lineRanges>
      <primaryLineNumber>276</primaryLineNumber>

      <fileName>/var/hudson/jobs/TinRead/workspace/trunk/src/sibimol/marcforms/entities/FixlenSequenceEditor.java</fileName>
      <moduleName>classes</moduleName>
      <packageName>sibimol.marcforms.entities</packageName>
      <category>CORRECTNESS</category>
      <type>NP_GUARANTEED_DEREF</type>
      <contextHashCode>23047</contextHashCode>
      <tooltip></tooltip>
      <instanceHash>ede3b3856ff9251282a6b08f48aaa842</instanceHash>
      </bug>

      After this build N+1:

      <bug>
      <message>Null value is guaranteed to be dereferenced</message>
      <priority>NORMAL</priority>
      <key>25551</key>
      <lineRanges>
      <range>
      <start>268</start>
      <end>268</end>
      </range>
      <range>
      <start>276</start>
      <end>276</end>
      </range>
      <range>
      <start>256</start>
      <end>256</end>
      </range>
      </lineRanges>
      <primaryLineNumber>268</primaryLineNumber>

      <fileName>/var/hudson/jobs/TinRead/workspace/trunk/src/sibimol/marcforms/entities/FixlenSequenceEditor.java</fileName>
      <moduleName>classes</moduleName>
      <packageName>sibimol.marcforms.entities</packageName>
      <category>CORRECTNESS</category>
      <type>NP_GUARANTEED_DEREF</type>
      <contextHashCode>25552</contextHashCode>
      <tooltip></tooltip>
      <instanceHash>ede3b3856ff9251282a6b08f48aaa842</instanceHash>
      </bug>

            drulli Ulli Hafner
            developster developster
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: