Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[FIXED JENKINS-13610] Added missing @extension to JavaDoc parser.
  • Loading branch information
uhafner committed Apr 27, 2012
1 parent 103a58c commit 00fa950f43828b224837f87e10ef698f8fe9c424
@@ -1,5 +1,7 @@
package hudson.plugins.warnings.parser;

import hudson.Extension;

import java.util.regex.Matcher;

import org.apache.commons.lang.StringUtils;
@@ -9,6 +11,7 @@
*
* @author Ulli Hafner
*/
@Extension
public class JavaDocParser extends RegexpLineParser {
private static final long serialVersionUID = 7127568148333474921L;
private static final String JAVA_DOC_WARNING_PATTERN = "(?:\\s*\\[(?:javadoc|WARNING)\\]\\s*)?(?:(?:(.*):(\\d+))|(?:\\s*javadoc\\s*)):\\s*warning\\s*-\\s*(.*)";
@@ -25,6 +25,8 @@
* @author Ulli Hafner
*/
public class ParserRegistryIntegrationTest extends HudsonTestCase {
/** If you add a new parser then this value needs to be adapted. */
private static final int NUMBER_OF_AVAILABLE_PARSERS = 40;
private static final String OLD_ID_ECLIPSE_JAVA_COMPILER = "Eclipse Java Compiler";
private static final String JAVA_WARNINGS_FILE = "deprecations.txt";
private static final String OLD_ID_JAVA_COMPILER = "Java Compiler";
@@ -33,14 +35,13 @@ public class ParserRegistryIntegrationTest extends HudsonTestCase {
private static final String OLD_API = "Old Parser API";

/**
* Verifies the current number of parsers. If you add a new parser then this
* value needs to be adapted.
* Verifies the current number of parsers.
*/
@Test
public void testParserRegistration() {
List<ParserDescription> groups = ParserRegistry.getAvailableParsers();

assertEquals("Wrong number of registered parsers", 39, groups.size());
assertEquals("Wrong number of registered parsers", NUMBER_OF_AVAILABLE_PARSERS, groups.size());
}

/**

0 comments on commit 00fa950

Please sign in to comment.