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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-plugin
    • None
    • Hudson 1.336, Warnings 3.0, Maven 3-alpha 5

      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.

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

              Created:
              Updated:
              Resolved: