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

Some javadoc warnings are not detected

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: warnings-plugin
    • Labels:
      None
    • Environment:
      any
    • Similar Issues:

      Description

      Following javadoc warnings is not detected:

      [javadoc] javadoc: warning - Text of tag @sys.prop in class ch.post.pf.mw.service.common.alarm.AlarmingService is too long!
      

      I checked the source code and could verify that the regexp used in the JavaDocParser does not match this line.

      I reproduced the problem using following simple test class. You may say that I could fix the regexp myself but it's very complicated so I didn't try it

      import java.util.regex.Matcher;
      import java.util.regex.Pattern;
      
      public class TestWarningPattern
      {
          private static final String JAVA_DOC_WARNING_PATTERN = "^\\s*(?:\\[javadoc\\]\\s*(.*):(\\d+):.*-\\s*(.*)|\\[WARNING\\]\\s*javadoc\\s*.*\\s*-\\s*(.*\\\"(.*)\\\")|\\[WARNING\\]\\s*(.*):(\\d+):warning\\s*-\\s*(.*))$";
          
          
          /**
           * @param args
           */
          public static void main(String[] args)
          {
              Pattern pattern = Pattern.compile(JAVA_DOC_WARNING_PATTERN);
              String line = "[javadoc] javadoc: warning - Text of tag @sys.prop in class ch.post.pf.mw.service.common.alarm.AlarmingService is too long!";
              //String line = "[javadoc] /appl/home/aplatest/hudson/workspace/APLAT_JDK16_00_init/APLAT_JDK16_snapshot/vob/aplat/Se/comp/AplatFileTransfer/src/ch/post/pf/mw/service/filetransfer/FileTransferConnection.java:704: warning - Tag @link: reference not found: java.util.regex.Pattern";
              Matcher matcher = pattern.matcher(line);
              System.out.println(matcher.matches());
          }
      }
      
      

        Attachments

          Activity

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              viretp viretp
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: