-
Bug
-
Resolution: Fixed
-
Major
-
None
-
any
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()); } }