Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[FIXED JENKINS-13610] Added missing @extension to JavaDoc parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Apr 27, 2012
1 parent 103a58c commit 00fa950
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
@@ -1,5 +1,7 @@
package hudson.plugins.warnings.parser;

import hudson.Extension;

import java.util.regex.Matcher;

import org.apache.commons.lang.StringUtils;
Expand All @@ -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*(.*)";
Expand Down
Expand Up @@ -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";
Expand All @@ -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());
}

/**
Expand Down

0 comments on commit 00fa950

Please sign in to comment.