Skip to content

Commit

Permalink
Decrease visibility of package-local class. #1555
Browse files Browse the repository at this point in the history
Fixes `PackageVisibleInnerClass` inspection violation.

Description:
>Reports package-local inner classes.
  • Loading branch information
mkordas authored and romani committed Aug 15, 2015
1 parent fe251ed commit 7453d38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
Expand Up @@ -59,6 +59,19 @@ public abstract class AbstractJavadocCheck extends Check {
*/
public static final String UNRECOGNIZED_ANTLR_ERROR_MESSAGE_KEY =
"javadoc.unrecognized.antlr.error";
/**
* Message key of error message. Missed close HTML tag breaks structure
* of parse tree, so parser stops parsing and generates such error
* message. This case is special because parser prints error like
* {@code "no viable alternative at input 'b \n *\n'"} and it is not
* clear that error is about missed close HTML tag.
*/
static final String JAVADOC_MISSED_HTML_CLOSE = "javadoc.missed.html.close";
/**
* Message key of error message.
*/
static final String JAVADOC_WRONG_SINGLETON_TAG =
"javadoc.wrong.singleton.html.tag";

/**
* key is "line:column"
Expand Down Expand Up @@ -498,21 +511,7 @@ private void walk(DetailNode root) {
/**
* Custom error listener for JavadocParser that prints user readable errors.
*/
static class DescriptiveErrorListener extends BaseErrorListener {
/**
* Message key of error message. Missed close HTML tag breaks structure
* of parse tree, so parser stops parsing and generates such error
* message. This case is special because parser prints error like
* {@code "no viable alternative at input 'b \n *\n'"} and it is not
* clear that error is about missed close HTML tag.
*/
static final String JAVADOC_MISSED_HTML_CLOSE = "javadoc.missed.html.close";

/**
* Message key of error message.
*/
static final String JAVADOC_WRONG_SINGLETON_TAG =
"javadoc.wrong.singleton.html.tag";
private static class DescriptiveErrorListener extends BaseErrorListener {

/**
* Parse error while rule recognition.
Expand Down
Expand Up @@ -19,8 +19,8 @@

package com.puppycrawl.tools.checkstyle.checks.javadoc;

import static com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck.DescriptiveErrorListener.JAVADOC_MISSED_HTML_CLOSE;
import static com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck.DescriptiveErrorListener.JAVADOC_WRONG_SINGLETON_TAG;
import static com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck.JAVADOC_MISSED_HTML_CLOSE;
import static com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck.JAVADOC_WRONG_SINGLETON_TAG;
import static com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck.PARSE_ERROR_MESSAGE_KEY;
import static com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck.UNRECOGNIZED_ANTLR_ERROR_MESSAGE_KEY;

Expand Down

0 comments on commit 7453d38

Please sign in to comment.