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

Warnings plugin failing to parse javac warnings where [-1,-1] is in the end

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • warnings-plugin
    • None
    • Hudson 1.336, Warnings 3.0, Maven 3-alpha 5

    Description

      We get warnings in our maven build output in the format:

      -----------------
      [WARNING] C:\build\hudson_home\jobs\calculator-app-maven3\workspace\maven3\com.company.demo.webservice.extender\src\com\company\webservice\extender\Activator.java (at line 39):[-1,-1]
      public Bundle bundle;
      ^^^^^^
      The field Activator.WebServiceBundle.bundle is never read locally
      -----------------

      We did some reengineering and found out that the javac parser class in the warnings.hpi misses these warnings due to the regular expression which expects the numbers in brackets to be positive. Why they are negative we do not know yet, but the plugin should display the warnings anyway. We created a byte code patch for us by changing the regexp to "[WARNING]\s*(.):[(.).,;# 0-9]\s(?:[(.)])?\s(.*)" but it is a hack only (to keep the line length in the class file). A more correct version should include the "-" and switch back to \d.

      In case somebody else has this issue I attached the patched HPI so that you can at least get the warnings rudimentarly.

      Attachments

        Activity

          rwetzold rwetzold created issue -
          drulli Ulli Hafner made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Minor [ 4 ]
          drulli Ulli Hafner made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          drulli Ulli Hafner made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          drulli Ulli Hafner made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 135080 ] JNJira + In-Review [ 203243 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: