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

Identify warnings - The analysis-core gives different contextHashCode for the same warnings

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: findbugs-plugin
    • Labels:
      None
    • Environment:
      Hudson, Findbugs, PMD
    • Similar Issues:

      Description

      I think the 'contextHashCode' depends on the seven lines around the warning line (up 3, down 3, warning in the centre).

      But if I add one/several lines in the java code, the same number of new and fixed warnings appear, meaning that the same warnings in the current and old build can not be identified.

      In a simple case,the source is,

      package foo;
      
      /**
       * Hello world!
       *
       */
      public class App 
      {                                                                          
          public static void main( String[] args )                                   
          {
              System.out.println( "Hello World!!!" );                                   
          }
      	public boolean equals(Object o){
      		return true;
      		}	
           			
         }
      
      

      Then I add one line in the top of the file, which does not affect the code;

      But the build result tells that there are two new warnings and fixed warnings;(see pic1)

      And I find that the contextHashCode of the warnings in the current build and old builds are not the same.(see findbugs-warnings (1).xml and findbugs-warnings .xml)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                tanyunshi tanyunshi
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: