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

Some compiler warnings are misidentified as Javadoc warnings

    • warnings-ng 4.0.0, analysis-model-api 3.0.0

      We had warnings showing up still on Jenkins after changing our build over to treat all Javadoc warnings as errors.

      In investigating how that was possible, we found the following warning:

      [ImmutableEnumChecker] enums should be immutable: 'Type' has field 'mime' of type 'com.acme.MyEnumType', the declaration of type 'com.acme.MyEnumType' is not annotated with @com.google.errorprone.annotations.Immutable
      

      But that is coming from the Java compiler, or specifically from Error Prone, not from Javadoc. I assume it's because it happens to mention an annotation, which contains the @ typically also seen in Javadoc.

      Another build has the same problem, except every warning is misidentified as being from JavaDoc.

      [UnitTestGroup2] 2019-01-08 14:02:07 /opt/data/jenkins/Pipeline-Bitbucket/core@2/processing/src/java/com/acme/export/print/AbstractPdfExporter.java:54: warning: [deprecation] createTmpDirectory(String) in FileUtils has been deprecated
      

      In this case, there is also a @ sign, but this time it's part of the file path for the project directory, which isn't anything I have control over even.

          [JENKINS-54506] Some compiler warnings are misidentified as Javadoc warnings

          trejkaz created issue -
          Ulli Hafner made changes -
          Component/s New: analysis-model [ 23523 ]
          Component/s Original: warnings-plugin [ 15513 ]
          Labels New: help-wanted newbie-friendly
          Ulli Hafner made changes -
          Assignee Original: Ulli Hafner [ drulli ]
          trejkaz made changes -
          Description Original: We had warnings showing up still on Jenkins after changing our build over to treat all Javadoc warnings as errors.

          In investigating how that was possible, we found the following warning:

          {code:java}
          [ImmutableEnumChecker] enums should be immutable: 'Type' has field 'mime' of type 'com.acme.MyEnumType', the declaration of type 'com.acme.MyEnumType' is not annotated with @com.google.errorprone.annotations.Immutable
          {code}

          But that is coming from the Java compiler, or specifically from Error Prone, not from Javadoc. I assume it's because it happens to mention an annotation, which contains the {{@}} typically also seen in Javadoc.
          New: We had warnings showing up still on Jenkins after changing our build over to treat all Javadoc warnings as errors.

          In investigating how that was possible, we found the following warning:

          {noformat}
          [ImmutableEnumChecker] enums should be immutable: 'Type' has field 'mime' of type 'com.acme.MyEnumType', the declaration of type 'com.acme.MyEnumType' is not annotated with @com.google.errorprone.annotations.Immutable
          {noformat}

          But that is coming from the Java compiler, or specifically from Error Prone, not from Javadoc. I assume it's because it happens to mention an annotation, which contains the {{@}} typically also seen in Javadoc.

          Another build has the same problem, except _every_ warning is misidentified as being from JavaDoc.

          {noformat}
          [UnitTestGroup2] 2019-01-08 14:02:07 /opt/data/jenkins/Pipeline-Bitbucket/core@2/processing/src/java/com/acme/export/print/AbstractPdfExporter.java:54: warning: [deprecation] createTmpDirectory(String) in FileUtils has been deprecated
          {noformat}

          In this case, there is also a @ sign, but this time it's part of the file path for the project directory, which isn't anything I have control over even. :(
          Mrinal Dutta made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Mrinal Dutta made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]
          Lorenz Aebi made changes -
          Assignee New: Lorenz Aebi [ laebi ]
          Lorenz Aebi made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Ulli Hafner made changes -
          Released As New: warnings-ng 4.0.0, analysis-model-api 3.0.0
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]

            laebi Lorenz Aebi
            trejkaz trejkaz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: