Fix AtclauseOrder check violations in codebase, issue #978

This commit is contained in:
Michal Kordas 2015-04-24 20:46:11 +02:00
parent 31db0435b7
commit 55b266cd92
19 changed files with 22 additions and 22 deletions

View File

@ -226,6 +226,7 @@
<module name="SuppressWarnings"/>
<module name="OuterTypeFilename"/>
<module name="HideUtilityClassConstructor"/>
<module name="AtclauseOrder"/>
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
</module>
@ -236,7 +237,6 @@
<module name="AnnotationLocation"/>
<module name="AnonInnerLength"/>
<module name="ArrayTypeStyle"/>
<module name="AtclauseOrder"/>
<module name="AvoidEscapedUnicodeCharacters"/>
<module name="AvoidInlineConditionals"/>
<module name="AvoidStaticImport"/>

View File

@ -567,8 +567,8 @@ public class CheckStyleTask extends Task
}
/**
* @return a DefaultLogger instance
* @param task the task to possibly log to
* @return a DefaultLogger instance
* @throws IOException if an error occurs
*/
private AuditListener createDefaultLogger(Task task)
@ -583,8 +583,8 @@ public class CheckStyleTask extends Task
}
/**
* @return an XMLLogger instance
* @param task the task to possibly log to
* @return an XMLLogger instance
* @throws IOException if an error occurs
*/
private AuditListener createXMLLogger(Task task) throws IOException

View File

@ -440,11 +440,11 @@ public final class ConfigurationLoader
* @param defaultValue default to use if one of the properties in value
* cannot be resolved from props.
*
* @return the original string with the properties replaced, or
* <code>null</code> if the original string is <code>null</code>.
* @throws CheckstyleException if the string contains an opening
* <code>${</code> without a closing
* <code>}</code>
* @return the original string with the properties replaced, or
* <code>null</code> if the original string is <code>null</code>.
*
* Code copied from ant -
* http://cvs.apache.org/viewcvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java

View File

@ -80,10 +80,10 @@ public final class Main
* Parses and executes Checkstyle based on passed arguments.
* @param args
* command line parameters
* @return parsed information about passed parameters
* @throws ParseException
* when passed arguments are not valid
* @exception CheckstyleException when provided parameters are not supported
* @return parsed information about passed parameters
*/
private static CommandLine parseCli(String[] args)
throws ParseException

View File

@ -146,9 +146,9 @@ final class PropertyCacheFile
}
/**
* @return whether the specified file has already been checked ok
* @param fileName the file to check
* @param timestamp the timestamp of the file to check
* @return whether the specified file has already been checked ok
*/
boolean alreadyChecked(String fileName, long timestamp)
{

View File

@ -27,8 +27,8 @@ import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
* resolve the values of external properties like <code>${basename}</code>
* that occur in the configuration file.
*
* @see ConfigurationLoader
* @author lkuehne
* @see ConfigurationLoader
*/
public interface PropertyResolver
{

View File

@ -447,11 +447,11 @@ public final class TreeWalker
*
* @param contents
* contains the contents of the file
* @return the root of the AST
* @throws TokenStreamException
* if lexing failed
* @throws RecognitionException
* if parsing failed
* @return the root of the AST
*/
public static DetailAST parse(FileContents contents)
throws RecognitionException, TokenStreamException

View File

@ -174,8 +174,8 @@ public final class Utils
}
/**
* @return the base class name from a fully qualified name
* @param type the fully qualified name. Cannot be null
* @return the base class name from a fully qualified name
*/
public static String baseClassname(String type)
{

View File

@ -206,8 +206,8 @@ public class XMLLogger
}
/**
* @return whether the given argument a character or entity reference
* @param ent the possible entity to look for.
* @return whether the given argument a character or entity reference
*/
public boolean isReference(String ent)
{

View File

@ -176,11 +176,11 @@ public final class FileContents implements CommentListener
/**
* Returns the specified C comment as a String array.
* @return C comment as a array
* @param startLineNo the starting line number
* @param startColNo the starting column number
* @param endLineNo the ending line number
* @param endColNo the ending column number
* @return C comment as a array
**/
private String[] extractCComment(int startLineNo, int startColNo,
int endLineNo, int endColNo)
@ -206,8 +206,8 @@ public final class FileContents implements CommentListener
/**
* Returns the Javadoc comment before the specified line.
* A return value of <code>null</code> means there is no such comment.
* @return the Javadoc comment, or <code>null</code> if none
* @param lineNoBefore the line number to check before
* @return the Javadoc comment, or <code>null</code> if none
**/
public TextBlock getJavadocBefore(int lineNoBefore)
{

View File

@ -21,9 +21,9 @@ package com.puppycrawl.tools.checkstyle.api;
import com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser;
/**
* @author Baratali Izmailov
* @see <a href="http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html">
* javadoc - The Java API Documentation Generator</a>
* @author Baratali Izmailov
*/
public final class JavadocTokenTypes
{

View File

@ -30,9 +30,9 @@ import com.puppycrawl.tools.checkstyle.api.Check;
* representation to the {@link Enum} is to {@link String#trim()} the string
* and convert using {@link String#toUpperCase()} and then look up using
* {@link Enum#valueOf}.
* @param <T> the type of the option.
* @author Oliver Burn
* @author Rick Giles
* @param <T> the type of the option.
*/
public abstract class AbstractOptionCheck<T extends Enum<T>>
extends Check

View File

@ -122,8 +122,8 @@ public class ClassResolver
}
/**
* @return whether a specified class is loadable with safeLoad().
* @param name name of the class to check
* @return whether a specified class is loadable with safeLoad().
*/
public boolean isLoadable(String name)
{

View File

@ -20,8 +20,8 @@ package com.puppycrawl.tools.checkstyle.checks.blocks;
/**
* Represents the policy for checking block statements.
* @see com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck
* @author Rick Giles
* @see com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck
*/
public enum BlockOption
{

View File

@ -20,8 +20,8 @@ package com.puppycrawl.tools.checkstyle.checks.imports;
/**
* Represents the policy for checking import order statements.
* @see com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck
* @author David DIDIER
* @see com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck
*/
public enum ImportOrderOption
{

View File

@ -580,8 +580,8 @@ public class JavadocMethodCheck extends AbstractTypeAwareCheck
* Returns the tags in a javadoc comment. Only finds throws, exception,
* param, return and see tags.
*
* @return the tags found
* @param comment the Javadoc comment
* @return the tags found
*/
private List<JavadocTag> getMethodTags(TextBlock comment)
{

View File

@ -108,8 +108,8 @@ public final class MethodCountCheck extends Check
}
/**
* @return the value of a scope counter
* @param scope the scope counter to get the value of
* @return the value of a scope counter
*/
int value(Scope scope)
{

View File

@ -50,11 +50,11 @@ public final class TokenTypesDoclet
/**
* The doclet's starter method.
* @param root <code>RootDoc</code> given to the doclet
* @return true if the given <code>RootDoc</code> is processed.
* @exception FileNotFoundException will be thrown if the doclet
* will be unable to write to the specified file.
* @exception UnsupportedEncodingException will be thrown if the doclet
* will be unable to use UTF-8 encoding.
* @return true if the given <code>RootDoc</code> is processed.
*/
public static boolean start(RootDoc root)
throws FileNotFoundException, UnsupportedEncodingException

View File

@ -54,9 +54,9 @@ import org.apache.commons.beanutils.ConversionException;
* since that module makes the suppression comments in the .java
* files available <i>sub rosa</i>.
* </p>
* @see FileContentsHolder
* @author Mike McMahon
* @author Rick Giles
* @see FileContentsHolder
*/
public class SuppressionCommentFilter
extends AutomaticBean