From 54ccca18635a4aeea90da86d30590df498f76b08 Mon Sep 17 00:00:00 2001 From: Baratali Izmailov Date: Tue, 18 Aug 2015 04:24:06 -0400 Subject: [PATCH] Issue #1566: First sentence in a comment should start with a capital letter --- .../test/base/BaseCheckTestSupport.java | 2 +- .../puppycrawl/tools/checkstyle/Checker.java | 22 +++++----- .../tools/checkstyle/ConfigurationLoader.java | 44 +++++++++---------- .../checkstyle/DefaultConfiguration.java | 6 +-- .../tools/checkstyle/DefaultContext.java | 2 +- .../tools/checkstyle/DefaultLogger.java | 10 ++--- .../com/puppycrawl/tools/checkstyle/Main.java | 10 ++--- .../tools/checkstyle/PackageNamesLoader.java | 4 +- .../checkstyle/PackageObjectFactory.java | 4 +- .../tools/checkstyle/PropertiesExpander.java | 2 +- .../tools/checkstyle/PropertyCacheFile.java | 12 ++--- .../tools/checkstyle/ScopeUtils.java | 2 +- .../tools/checkstyle/TreeWalker.java | 22 +++++----- .../puppycrawl/tools/checkstyle/Utils.java | 6 +-- .../tools/checkstyle/XMLLogger.java | 10 ++--- .../checkstyle/ant/CheckstyleAntTask.java | 38 ++++++++-------- .../checkstyle/api/AbstractFileSetCheck.java | 4 +- .../tools/checkstyle/api/AbstractLoader.java | 4 +- .../api/AbstractViolationReporter.java | 4 +- .../tools/checkstyle/api/AuditEvent.java | 4 +- .../tools/checkstyle/api/AutomaticBean.java | 2 +- .../tools/checkstyle/api/Check.java | 10 ++--- .../tools/checkstyle/api/Comment.java | 10 ++--- .../tools/checkstyle/api/DetailAST.java | 12 ++--- .../tools/checkstyle/api/FileContents.java | 10 ++--- .../tools/checkstyle/api/FilterSet.java | 2 +- .../tools/checkstyle/api/FullIdent.java | 8 ++-- .../tools/checkstyle/api/JavadocTagInfo.java | 14 +++--- .../checkstyle/api/LocalizedMessage.java | 22 +++++----- .../checkstyle/api/LocalizedMessages.java | 2 +- .../tools/checkstyle/api/Scope.java | 12 ++--- .../tools/checkstyle/api/SeverityLevel.java | 8 ++-- .../tools/checkstyle/api/TokenTypes.java | 2 +- .../checks/AbstractDeclarationCollector.java | 6 +-- .../checks/AbstractFormatCheck.java | 6 +-- .../checks/AbstractOptionCheck.java | 2 +- .../checks/AbstractTypeAwareCheck.java | 16 +++---- .../checks/ArrayTypeStyleCheck.java | 2 +- .../tools/checkstyle/checks/CheckUtils.java | 8 ++-- .../checkstyle/checks/ClassResolver.java | 6 +-- .../checks/DescendantTokenCheck.java | 14 +++--- .../checks/LineSeparatorOption.java | 2 +- .../checks/NewlineAtEndOfFileCheck.java | 2 +- .../checks/OuterTypeFilenameCheck.java | 2 +- .../checks/SuppressWarningsHolder.java | 18 ++++---- .../checks/TrailingCommentCheck.java | 4 +- .../checks/UncommentedMainCheck.java | 10 ++--- .../annotation/MissingDeprecatedCheck.java | 8 ++-- .../annotation/MissingOverrideCheck.java | 4 +- .../coding/AbstractNestedDepthCheck.java | 4 +- .../checks/coding/AbstractSuperCheck.java | 6 +-- .../checks/coding/EqualsHashCodeCheck.java | 4 +- .../checks/coding/HiddenFieldCheck.java | 20 ++++----- .../coding/IllegalInstantiationCheck.java | 8 ++-- .../checks/coding/IllegalThrowsCheck.java | 4 +- .../checks/coding/IllegalTypeCheck.java | 8 ++-- .../checks/coding/MagicNumberCheck.java | 2 +- .../checks/coding/NestedForDepthCheck.java | 2 +- .../checks/coding/NestedIfDepthCheck.java | 2 +- .../checks/coding/NestedTryDepthCheck.java | 2 +- .../coding/PackageDeclarationCheck.java | 2 +- .../checks/coding/RequireThisCheck.java | 4 +- .../checks/design/FinalClassCheck.java | 14 +++--- .../HideUtilityClassConstructorCheck.java | 14 +++--- .../checks/design/InterfaceIsTypeCheck.java | 2 +- .../checks/design/ThrowsCountCheck.java | 6 +-- .../design/VisibilityModifierCheck.java | 8 ++-- .../checks/header/AbstractHeaderCheck.java | 2 +- .../checkstyle/checks/header/HeaderCheck.java | 4 +- .../checks/header/RegexpHeaderCheck.java | 6 +-- .../checks/imports/AvoidStarImportCheck.java | 6 +-- .../imports/AvoidStaticImportCheck.java | 2 +- .../checks/imports/IllegalImportCheck.java | 2 +- .../checks/imports/ImportControlLoader.java | 10 ++--- .../checks/imports/ImportOrderCheck.java | 2 +- .../checks/imports/RedundantImportCheck.java | 6 +-- .../checks/imports/UnusedImportsCheck.java | 14 +++--- .../AbstractExpressionHandler.java | 8 ++-- .../checks/indentation/HandlerFactory.java | 2 +- .../checks/indentation/IndentLevel.java | 2 +- .../checks/indentation/IndentationCheck.java | 16 +++---- .../checkstyle/checks/javadoc/HtmlTag.java | 4 +- .../checks/javadoc/JavadocMethodCheck.java | 20 ++++----- .../checks/javadoc/JavadocStyleCheck.java | 2 +- .../checkstyle/checks/javadoc/JavadocTag.java | 8 ++-- .../checks/javadoc/JavadocTypeCheck.java | 14 +++--- .../checks/javadoc/JavadocUtils.java | 12 ++--- .../checks/javadoc/JavadocVariableCheck.java | 6 +-- .../javadoc/SingleLineJavadocCheck.java | 2 +- .../checkstyle/checks/javadoc/TagParser.java | 4 +- .../checks/javadoc/WriteTagCheck.java | 10 ++--- .../metrics/AbstractClassCouplingCheck.java | 2 +- .../metrics/AbstractComplexityCheck.java | 8 ++-- .../metrics/ClassFanOutComplexityCheck.java | 2 +- .../metrics/CyclomaticComplexityCheck.java | 2 +- .../checks/metrics/JavaNCSSCheck.java | 16 +++---- .../checks/naming/AbstractClassNameCheck.java | 4 +- .../checkstyle/checks/regexp/RegexpCheck.java | 2 +- .../checks/sizes/AnonInnerLengthCheck.java | 4 +- .../sizes/ExecutableStatementCountCheck.java | 4 +- .../checks/sizes/FileLengthCheck.java | 4 +- .../checks/sizes/LineLengthCheck.java | 6 +-- .../checks/sizes/MethodCountCheck.java | 6 +-- .../checks/sizes/MethodLengthCheck.java | 6 +-- .../checks/sizes/ParameterNumberCheck.java | 8 ++-- .../whitespace/WhitespaceAroundCheck.java | 2 +- .../tools/checkstyle/filters/CSVFilter.java | 2 +- .../checkstyle/filters/IntMatchFilter.java | 2 +- .../checkstyle/filters/IntRangeFilter.java | 4 +- .../filters/SeverityMatchFilter.java | 4 +- .../checkstyle/filters/SuppressElement.java | 14 +++--- .../checkstyle/filters/SuppressionFilter.java | 2 +- .../filters/SuppressionsLoader.java | 8 ++-- .../tools/checkstyle/gui/CodeSelector.java | 4 +- .../tools/checkstyle/gui/JTreeTable.java | 2 +- .../tools/checkstyle/DebugAuditAdapter.java | 2 +- .../checks/coding/HiddenFieldCheckTest.java | 8 ++-- .../HideUtilityClassConstructorCheckTest.java | 2 +- 118 files changed, 421 insertions(+), 421 deletions(-) diff --git a/src/it/java/com/google/checkstyle/test/base/BaseCheckTestSupport.java b/src/it/java/com/google/checkstyle/test/base/BaseCheckTestSupport.java index ca14ae104..b14a70b54 100644 --- a/src/it/java/com/google/checkstyle/test/base/BaseCheckTestSupport.java +++ b/src/it/java/com/google/checkstyle/test/base/BaseCheckTestSupport.java @@ -30,7 +30,7 @@ import com.puppycrawl.tools.checkstyle.api.Configuration; public abstract class BaseCheckTestSupport { - /** a brief logger that only display info about errors */ + /** A brief logger that only display info about errors */ protected static class BriefLogger extends DefaultLogger { diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java b/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java index be532cd2c..88ec46acc 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java @@ -59,26 +59,26 @@ public class Checker extends AutomaticBean implements MessageDispatcher { /** Logger for Checker */ private static final Log LOG = LogFactory.getLog(Checker.class); - /** maintains error count */ + /** Maintains error count */ private final SeverityLevelCounter counter = new SeverityLevelCounter( SeverityLevel.ERROR); - /** vector of listeners */ + /** Vector of listeners */ private final List listeners = Lists.newArrayList(); - /** vector of fileset checks */ + /** Vector of fileset checks */ private final List fileSetChecks = Lists.newArrayList(); - /** class loader to resolve classes with. **/ + /** Class loader to resolve classes with. **/ private ClassLoader classLoader = Thread.currentThread() .getContextClassLoader(); - /** the basedir to strip off in filenames */ + /** The basedir to strip off in filenames */ private String basedir; - /** locale country to report messages **/ + /** Locale country to report messages **/ private String localeCountry = Locale.getDefault().getCountry(); - /** locale language to report messages **/ + /** Locale language to report messages **/ private String localeLanguage = Locale.getDefault().getLanguage(); /** The factory for instantiating submodules */ @@ -87,13 +87,13 @@ public class Checker extends AutomaticBean implements MessageDispatcher { /** The classloader used for loading Checkstyle module classes. */ private ClassLoader moduleClassLoader; - /** the context of all child components */ + /** The context of all child components */ private Context childContext; /** The audit event filters */ private final FilterSet filters = new FilterSet(); - /** the file extensions that are accepted */ + /** The file extensions that are accepted */ private String[] fileExtensions = ArrayUtils.EMPTY_STRING_ARRAY; /** @@ -292,7 +292,7 @@ public class Checker extends AutomaticBean implements MessageDispatcher { this.basedir = basedir; } - /** notify all listeners about the audit start */ + /** Notify all listeners about the audit start */ protected void fireAuditStarted() { final AuditEvent evt = new AuditEvent(this); for (final AuditListener listener : listeners) { @@ -300,7 +300,7 @@ public class Checker extends AutomaticBean implements MessageDispatcher { } } - /** notify all listeners about the audit end */ + /** Notify all listeners about the audit end */ protected void fireAuditFinished() { final AuditEvent evt = new AuditEvent(this); for (final AuditListener listener : listeners) { diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java index 3f629948c..88902ca93 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java @@ -57,49 +57,49 @@ public final class ConfigurationLoader { /** Logger for ConfigurationLoader. */ private static final Log LOG = LogFactory.getLog(ConfigurationLoader.class); - /** the public ID for version 1_0 of the configuration dtd */ + /** The public ID for version 1_0 of the configuration dtd */ private static final String DTD_PUBLIC_ID_1_0 = "-//Puppy Crawl//DTD Check Configuration 1.0//EN"; - /** the resource for version 1_0 of the configuration dtd */ + /** The resource for version 1_0 of the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_0 = "com/puppycrawl/tools/checkstyle/configuration_1_0.dtd"; - /** the public ID for version 1_1 of the configuration dtd */ + /** The public ID for version 1_1 of the configuration dtd */ private static final String DTD_PUBLIC_ID_1_1 = "-//Puppy Crawl//DTD Check Configuration 1.1//EN"; - /** the resource for version 1_1 of the configuration dtd */ + /** The resource for version 1_1 of the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_1 = "com/puppycrawl/tools/checkstyle/configuration_1_1.dtd"; - /** the public ID for version 1_2 of the configuration dtd */ + /** The public ID for version 1_2 of the configuration dtd */ private static final String DTD_PUBLIC_ID_1_2 = "-//Puppy Crawl//DTD Check Configuration 1.2//EN"; - /** the resource for version 1_2 of the configuration dtd */ + /** The resource for version 1_2 of the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_2 = "com/puppycrawl/tools/checkstyle/configuration_1_2.dtd"; - /** the public ID for version 1_3 of the configuration dtd */ + /** The public ID for version 1_3 of the configuration dtd */ private static final String DTD_PUBLIC_ID_1_3 = "-//Puppy Crawl//DTD Check Configuration 1.3//EN"; - /** the resource for version 1_3 of the configuration dtd */ + /** The resource for version 1_3 of the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_3 = "com/puppycrawl/tools/checkstyle/configuration_1_3.dtd"; - /** the SAX document handler */ + /** The SAX document handler */ private final InternalLoader saxHandler; - /** property resolver **/ + /** Property resolver **/ private final PropertyResolver overridePropsResolver; - /** the loaded configurations **/ + /** The loaded configurations **/ private final Deque configStack = new ArrayDeque<>(); - /** the Configuration that is being built */ + /** The Configuration that is being built */ private Configuration configuration; - /** flags if modules with the severity 'ignore' should be omitted. */ + /** Flags if modules with the severity 'ignore' should be omitted. */ private final boolean omitIgnoredModules; /** @@ -414,23 +414,23 @@ public final class ConfigurationLoader { */ private final class InternalLoader extends AbstractLoader { - /** module elements */ + /** Module elements */ private static final String MODULE = "module"; - /** name attribute */ + /** Name attribute */ private static final String NAME = "name"; - /** property element */ + /** Property element */ private static final String PROPERTY = "property"; - /** value attribute */ + /** Value attribute */ private static final String VALUE = "value"; - /** default attribute */ + /** Default attribute */ private static final String DEFAULT = "default"; - /** name of the severity property */ + /** Name of the severity property */ private static final String SEVERITY = "severity"; - /** name of the message element */ + /** Name of the message element */ private static final String MESSAGE = "message"; - /** name of the message element */ + /** Name of the message element */ private static final String METADATA = "metadata"; - /** name of the key attribute */ + /** Name of the key attribute */ private static final String KEY = "key"; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java index 318324c31..9681287be 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java @@ -40,13 +40,13 @@ public final class DefaultConfiguration implements Configuration { /** The name of this configuration */ private final String name; - /** the list of child Configurations */ + /** The list of child Configurations */ private final List children = Lists.newArrayList(); - /** the map from attribute names to attribute values */ + /** The map from attribute names to attribute values */ private final Map attributeMap = Maps.newHashMap(); - /** the map containing custom messages. */ + /** The map containing custom messages. */ private final Map messages = Maps.newHashMap(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java index 4fbbad862..4daf9c6a6 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java @@ -31,7 +31,7 @@ import com.puppycrawl.tools.checkstyle.api.Context; * @author lkuehne */ public final class DefaultContext implements Context { - /** stores the context entries */ + /** Stores the context entries */ private final Map entries = Maps.newHashMap(); @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java index 1d31012ac..498ae4ec4 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java @@ -43,17 +43,17 @@ import com.puppycrawl.tools.checkstyle.api.SeverityLevel; public class DefaultLogger extends AutomaticBean implements AuditListener { - /** cushion for avoiding StringBuffer.expandCapacity */ + /** Cushion for avoiding StringBuffer.expandCapacity */ private static final int BUFFER_CUSHION = 12; - /** where to write info messages **/ + /** Where to write info messages **/ private final PrintWriter infoWriter; - /** close info stream after use */ + /** Close info stream after use */ private final boolean closeInfo; - /** where to write error messages **/ + /** Where to write error messages **/ private final PrintWriter errorWriter; - /** close error stream after use */ + /** Close error stream after use */ private final boolean closeError; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/Main.java b/src/main/java/com/puppycrawl/tools/checkstyle/Main.java index ea861cd52..16fed05a9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/Main.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/Main.java @@ -394,15 +394,15 @@ public final class Main { /** Helper structure to clear show what is required for Checker to run. **/ private static class CliOptions { - /** properties file location */ + /** Properties file location */ private String propertiesLocation; - /** config file location */ + /** Config file location */ private String configLocation; - /** output format */ + /** Output format */ private String format; - /** output file location */ + /** Output file location */ private String outputLocation; - /** list of file to validate */ + /** List of file to validate */ private List files; } } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PackageNamesLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/PackageNamesLoader.java index 85f6835f9..ae9d2efe9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/PackageNamesLoader.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/PackageNamesLoader.java @@ -46,11 +46,11 @@ import com.puppycrawl.tools.checkstyle.api.CheckstyleException; */ public final class PackageNamesLoader extends AbstractLoader { - /** the public ID for the configuration dtd */ + /** The public ID for the configuration dtd */ private static final String DTD_PUBLIC_ID = "-//Puppy Crawl//DTD Package Names 1.0//EN"; - /** the resource for the configuration dtd */ + /** The resource for the configuration dtd */ private static final String DTD_RESOURCE_NAME = "com/puppycrawl/tools/checkstyle/packages_1_0.dtd"; diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java index 688db3bc8..3f36cb1a1 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java @@ -36,10 +36,10 @@ class PackageObjectFactory implements ModuleFactory { /** Logger for PackageObjectFactory. */ private static final Log LOG = LogFactory.getLog(PackageObjectFactory.class); - /** a list of package names to prepend to class names */ + /** A list of package names to prepend to class names */ private final Set packages; - /** the class loader used to load Checkstyle core and custom modules. */ + /** The class loader used to load Checkstyle core and custom modules. */ private final ClassLoader moduleClassLoader; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java b/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java index 7fdffd5e0..ad1710b3c 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java @@ -29,7 +29,7 @@ import java.util.Properties; */ public final class PropertiesExpander implements PropertyResolver { - /** the underlying Properties object. */ + /** The underlying Properties object. */ private final Properties properties = new Properties(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java b/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java index 39cd14bd6..ac5c38cb1 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java @@ -57,25 +57,25 @@ final class PropertyCacheFile { */ private static final String CONFIG_HASH_KEY = "configuration*?"; - /** hex digits */ + /** Hex digits */ private static final char[] HEX_CHARS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; - /** mask for last byte */ + /** Mask for last byte */ private static final int MASK_0X0F = 0x0F; - /** bit shift */ + /** Bit shift */ private static final int SHIFT_4 = 4; - /** the details on files **/ + /** The details on files **/ private final Properties details = new Properties(); - /** configuration object **/ + /** Configuration object **/ private final Configuration config; - /** file name of cache **/ + /** File name of cache **/ private final String fileName; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/ScopeUtils.java b/src/main/java/com/puppycrawl/tools/checkstyle/ScopeUtils.java index 89133fbdb..e74075405 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/ScopeUtils.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/ScopeUtils.java @@ -31,7 +31,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; * @author Oliver Burn */ public final class ScopeUtils { - /** prevent instantiation */ + /** Prevent instantiation */ private ScopeUtils() { } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java b/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java index 8cd470742..827e9c166 100755 --- a/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java @@ -80,39 +80,39 @@ public final class TreeWalker WITH_COMMENTS } - /** default distance between tab stops */ + /** Default distance between tab stops */ private static final int DEFAULT_TAB_WIDTH = 8; - /** logger for debug purpose */ + /** Logger for debug purpose */ private static final Log LOG = LogFactory.getLog(TreeWalker.class); - /** maps from token name to ordinary checks */ + /** Maps from token name to ordinary checks */ private final Multimap tokenToOrdinaryChecks = HashMultimap.create(); - /** maps from token name to comment checks */ + /** Maps from token name to comment checks */ private final Multimap tokenToCommentChecks = HashMultimap.create(); - /** registered ordinary checks, that don't use comment nodes */ + /** Registered ordinary checks, that don't use comment nodes */ private final Set ordinaryChecks = Sets.newHashSet(); - /** registered comment checks */ + /** Registered comment checks */ private final Set commentChecks = Sets.newHashSet(); - /** the distance between tab stops */ + /** The distance between tab stops */ private int tabWidth = DEFAULT_TAB_WIDTH; - /** cache file **/ + /** Cache file **/ private PropertyCacheFile cache; - /** class loader to resolve classes with. **/ + /** Class loader to resolve classes with. **/ private ClassLoader classLoader; - /** context of child components */ + /** Context of child components */ private Context childContext; - /** a factory for creating submodules (i.e. the Checks) */ + /** A factory for creating submodules (i.e. the Checks) */ private ModuleFactory moduleFactory; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/Utils.java b/src/main/java/com/puppycrawl/tools/checkstyle/Utils.java index 7286ab092..1856cf4c7 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/Utils.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/Utils.java @@ -45,9 +45,9 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; */ public final class Utils { - /** maps from a token name to value */ + /** Maps from a token name to value */ private static final ImmutableMap TOKEN_NAME_TO_VALUE; - /** maps from a token value to name */ + /** Maps from a token value to name */ private static final String[] TOKEN_VALUE_TO_NAME; /** Array of all token IDs */ @@ -84,7 +84,7 @@ public final class Utils { TOKEN_IDS = ArrayUtils.toPrimitive(ids); } - /** stop instances being created **/ + /** Stop instances being created **/ private Utils() { } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java b/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java index acbd7adee..a258bd7b0 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java @@ -42,20 +42,20 @@ import com.puppycrawl.tools.checkstyle.api.SeverityLevel; public class XMLLogger extends AutomaticBean implements AuditListener { - /** decimal radix */ + /** Decimal radix */ private static final int BASE_10 = 10; - /** hex radix */ + /** Hex radix */ private static final int BASE_16 = 16; - /** some known entities to detect */ + /** Some known entities to detect */ private static final String[] ENTITIES = {"gt", "amp", "lt", "apos", "quot", }; - /** close output stream in auditFinished */ + /** Close output stream in auditFinished */ private final boolean closeStream; - /** helper writer that allows easy encoding and printing */ + /** Helper writer that allows easy encoding and printing */ private PrintWriter writer; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java b/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java index 2951d7dce..7fb0ec4a9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask.java @@ -60,42 +60,42 @@ import com.puppycrawl.tools.checkstyle.api.SeverityLevelCounter; * @author Oliver Burn */ public class CheckstyleAntTask extends Task { - /** poor man's enum for an xml formatter */ + /** Poor man's enum for an xml formatter */ private static final String E_XML = "xml"; - /** poor man's enum for an plain formatter */ + /** Poor man's enum for an plain formatter */ private static final String E_PLAIN = "plain"; - /** class path to locate class files */ + /** Class path to locate class files */ private Path classpath; - /** name of file to check */ + /** Name of file to check */ private String fileName; - /** config file containing configuration */ + /** Config file containing configuration */ private String configLocation; - /** whether to fail build on violations */ + /** Whether to fail build on violations */ private boolean failOnViolation = true; - /** property to set on violations */ + /** Property to set on violations */ private String failureProperty; - /** contains the filesets to process */ + /** Contains the filesets to process */ private final List fileSets = Lists.newArrayList(); - /** contains the formatters to log to */ + /** Contains the formatters to log to */ private final List formatters = Lists.newArrayList(); - /** contains the Properties to override */ + /** Contains the Properties to override */ private final List overrideProps = Lists.newArrayList(); - /** the name of the properties file */ + /** The name of the properties file */ private File propertiesFile; - /** the maximum number of errors that are tolerated. */ + /** The maximum number of errors that are tolerated. */ private int maxErrors; - /** the maximum number of warnings that are tolerated. */ + /** The maximum number of warnings that are tolerated. */ private int maxWarnings = Integer.MAX_VALUE; /** @@ -476,7 +476,7 @@ public class CheckstyleAntTask extends Task { * @author Oliver Burn */ public static class FormatterType extends EnumeratedAttribute { - /** my possible values */ + /** My possible values */ private static final String[] VALUES = {E_XML, E_PLAIN}; @Override @@ -490,9 +490,9 @@ public class CheckstyleAntTask extends Task { * @author Oliver Burn */ public static class Formatter { - /** the formatter type */ + /** The formatter type */ private FormatterType formatterType; - /** the file to output to */ + /** The file to output to */ private File toFile; /** Whether or not the write to the named file. */ private boolean useFile = true; @@ -573,9 +573,9 @@ public class CheckstyleAntTask extends Task { * Represents a property that consists of a key and value. */ public static class Property { - /** the property key */ + /** The property key */ private String key; - /** the property value */ + /** The property value */ private String value; /** @return the property key */ @@ -606,7 +606,7 @@ public class CheckstyleAntTask extends Task { /** Represents a custom listener. */ public static class Listener { - /** classname of the listener class */ + /** Classname of the listener class */ private String classname; /** @return the classname */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java index 72b51955c..bbdb62a70 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java @@ -38,10 +38,10 @@ public abstract class AbstractFileSetCheck /** The dispatcher errors are fired to. */ private MessageDispatcher messageDispatcher; - /** the file extensions that are accepted by this filter */ + /** The file extensions that are accepted by this filter */ private String[] fileExtensions = {}; - /** collects the error messages */ + /** Collects the error messages */ private final LocalizedMessages messages = new LocalizedMessages(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractLoader.java index 039161f41..5d3969edd 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractLoader.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractLoader.java @@ -51,9 +51,9 @@ import com.google.common.collect.Maps; */ public abstract class AbstractLoader extends DefaultHandler { - /** maps public id to resolve to esource name for the DTD */ + /** Maps public id to resolve to esource name for the DTD */ private final Map publicIdToResourceNameMap; - /** parser to read XML files **/ + /** Parser to read XML files **/ private final XMLReader parser; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java index 0c20f91e4..33f791c5a 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java @@ -30,10 +30,10 @@ import java.util.Map; */ public abstract class AbstractViolationReporter extends AutomaticBean { - /** the severity level of any violations found */ + /** The severity level of any violations found */ private SeverityLevel severityLevel = SeverityLevel.ERROR; - /** the identifier of the reporter */ + /** The identifier of the reporter */ private String id; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java index def551635..86da3e723 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java @@ -42,9 +42,9 @@ public final class AuditEvent extends EventObject { /** Record a version. */ private static final long serialVersionUID = -3774725606973812736L; - /** filename event associated with **/ + /** Filename event associated with **/ private final String fileName; - /** message associated with the event **/ + /** Message associated with the event **/ private final LocalizedMessage message; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java index 7cb7b5c0a..c319c2f2d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java @@ -50,7 +50,7 @@ import com.google.common.collect.Lists; */ public class AutomaticBean implements Configurable, Contextualizable { - /** the configuration of this bean */ + /** The configuration of this bean */ private Configuration configuration; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Check.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Check.java index 3ef8f6f13..8292f221e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/Check.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Check.java @@ -35,19 +35,19 @@ import com.puppycrawl.tools.checkstyle.Utils; * your own checks */ public abstract class Check extends AbstractViolationReporter { - /** default tab width for column reporting */ + /** Default tab width for column reporting */ private static final int DEFAULT_TAB_WIDTH = 8; - /** the current file contents */ + /** The current file contents */ private FileContents fileContents; - /** the tokens the check is interested in */ + /** The tokens the check is interested in */ private final Set tokens = Sets.newHashSet(); - /** the object for collecting messages. */ + /** The object for collecting messages. */ private LocalizedMessages messages; - /** the tab width for column reporting */ + /** The tab width for column reporting */ private int tabWidth = DEFAULT_TAB_WIDTH; // meaningful default /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java index 36c484b39..25b75f617 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java @@ -25,19 +25,19 @@ package com.puppycrawl.tools.checkstyle.api; * @author o_sukhodolsky */ public class Comment implements TextBlock { - /** text of the comment. */ + /** Text of the comment. */ private final String[] text; - /** number of first line of the comment. */ + /** Number of first line of the comment. */ private final int firstLine; - /** number of last line of the comment. */ + /** Number of last line of the comment. */ private final int lastLine; - /** number of first column of the comment. */ + /** Number of first column of the comment. */ private final int firstCol; - /** number of last column of the comment. */ + /** Number of last column of the comment. */ private final int lastCol; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/DetailAST.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/DetailAST.java index d0bc3b5fa..4b8b34006 100755 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/DetailAST.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/DetailAST.java @@ -40,19 +40,19 @@ public final class DetailAST extends CommonASTWithHiddenTokens { /** For Serialisation that will never happen. */ private static final long serialVersionUID = -2580884815577559874L; - /** constant to indicate if not calculated the child count */ + /** Constant to indicate if not calculated the child count */ private static final int NOT_INITIALIZED = Integer.MIN_VALUE; - /** the line number **/ + /** The line number **/ private int lineNo = NOT_INITIALIZED; - /** the column number **/ + /** The column number **/ private int columnNo = NOT_INITIALIZED; - /** number of children */ + /** Number of children */ private int childCount = NOT_INITIALIZED; - /** the parent token */ + /** The parent token */ private DetailAST parent; - /** previous sibling */ + /** Previous sibling */ private DetailAST previousSibling; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java index 398154267..1640ed23c 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java @@ -42,21 +42,21 @@ public final class FileContents implements CommentListener { * itself -- no code. */ private static final String MATCH_SINGLELINE_COMMENT_PAT = "^\\s*//.*$"; - /** compiled regexp to match a single-line comment line */ + /** Compiled regexp to match a single-line comment line */ private static final Pattern MATCH_SINGLELINE_COMMENT = Pattern .compile(MATCH_SINGLELINE_COMMENT_PAT); - /** the file name */ + /** The file name */ private final String fileName; - /** the text */ + /** The text */ private final FileText text; - /** map of the Javadoc comments indexed on the last line of the comment. + /** Map of the Javadoc comments indexed on the last line of the comment. * The hack is it assumes that there is only one Javadoc comment per line. */ private final Map javadocComments = Maps.newHashMap(); - /** map of the C++ comments indexed on the first line of the comment. */ + /** Map of the C++ comments indexed on the first line of the comment. */ private final Map cppComments = Maps.newHashMap(); diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java index b3edda405..e602aecbb 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java @@ -33,7 +33,7 @@ import com.google.common.collect.Sets; */ public class FilterSet implements Filter { - /** filter set */ + /** Filter set */ private final Set filters = Sets.newHashSet(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java index 0890867f2..0f5fff96f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java @@ -40,14 +40,14 @@ import org.apache.commons.lang3.StringUtils; * @see TokenTypes#IDENT **/ public final class FullIdent { - /** the list holding subsequent elements of identifier **/ + /** The list holding subsequent elements of identifier **/ private final List elements = new ArrayList<>(); - /** the line number **/ + /** The line number **/ private int lineNo; - /** the column number **/ + /** The column number **/ private int colNo; - /** hide default constructor */ + /** Hide default constructor */ private FullIdent() { } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java index 9f48fdfa3..881e74831 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java @@ -341,9 +341,9 @@ public enum JavadocTagInfo { TokenTypes.ANNOTATION_DEF, }; - /** holds tag text to tag enum mappings **/ + /** Holds tag text to tag enum mappings **/ private static final Map TEXT_TO_TAG; - /** holds tag name to tag enum mappings **/ + /** Holds tag name to tag enum mappings **/ private static final Map NAME_TO_TAG; static { @@ -366,11 +366,11 @@ public enum JavadocTagInfo { Arrays.sort(DEF_TOKEN_TYPES_DEPRECATED); } - /** the tag text **/ + /** The tag text **/ private final String text; - /** the tag name **/ + /** The tag name **/ private final String name; - /** the tag type **/ + /** The tag type **/ private final Type type; /** @@ -496,10 +496,10 @@ public enum JavadocTagInfo { * @author Travis Schneeberger */ public enum Type { - /** block type. **/ + /** Block type. **/ BLOCK, - /** inline type. **/ + /** Inline type. **/ INLINE } } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessage.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessage.java index 4c8b34eb4..ac316f19c 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessage.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessage.java @@ -51,7 +51,7 @@ public final class LocalizedMessage /** Required for serialization. */ private static final long serialVersionUID = 5675176836184862150L; - /** the locale to localise messages to **/ + /** The locale to localise messages to **/ private static Locale sLocale = Locale.getDefault(); /** @@ -61,33 +61,33 @@ public final class LocalizedMessage private static final Map BUNDLE_CACHE = Collections.synchronizedMap(new HashMap()); - /** the default severity level if one is not specified */ + /** The default severity level if one is not specified */ private static final SeverityLevel DEFAULT_SEVERITY = SeverityLevel.ERROR; - /** the line number **/ + /** The line number **/ private final int lineNo; - /** the column number **/ + /** The column number **/ private final int colNo; - /** the severity level **/ + /** The severity level **/ private final SeverityLevel severityLevel; - /** the id of the module generating the message. */ + /** The id of the module generating the message. */ private final String moduleId; - /** key for the message format **/ + /** Key for the message format **/ private final String key; - /** arguments for MessageFormat **/ + /** Arguments for MessageFormat **/ private final Object[] args; - /** name of the resource bundle to get messages from **/ + /** Name of the resource bundle to get messages from **/ private final String bundle; - /** class of the source for this LocalizedMessage */ + /** Class of the source for this LocalizedMessage */ private final Class sourceClass; - /** a custom message overriding the default message from the bundle. */ + /** A custom message overriding the default message from the bundle. */ private final String customMessage; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java index c5ab6a9ad..1b64f878f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java @@ -29,7 +29,7 @@ import com.google.common.collect.Sets; * @author Oliver Burn */ public final class LocalizedMessages { - /** contains the messages logged **/ + /** Contains the messages logged **/ private final Set messages = Sets.newTreeSet(); /** @return the logged messages **/ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java index 63e44ed40..40fd9fbf1 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java @@ -29,17 +29,17 @@ import java.util.Locale; * @author Mehmet Can Cömert */ public enum Scope { - /** nothing scope. */ + /** Nothing scope. */ NOTHING, - /** public scope. */ + /** Public scope. */ PUBLIC, - /** protected scope. */ + /** Protected scope. */ PROTECTED, - /** package or default scope. */ + /** Package or default scope. */ PACKAGE, - /** private scope. */ + /** Private scope. */ PRIVATE, - /** anonymous inner scope. */ + /** Anonymous inner scope. */ ANONINNER; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java index 500138910..a7174e735 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java @@ -35,13 +35,13 @@ import java.util.Locale; * @author Mehmet Can Cömert */ public enum SeverityLevel { - /** security level ignore. */ + /** Security level ignore. */ IGNORE, - /** security level info. */ + /** Security level info. */ INFO, - /** security level warning. */ + /** Security level warning. */ WARNING, - /** security level error. */ + /** Security level error. */ ERROR; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java index b9acfa9a1..9535e5323 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java @@ -3480,7 +3480,7 @@ public final class TokenTypes { public static final int COMMENT_CONTENT = GeneratedJavaTokenTypes.COMMENT_CONTENT; - /** prevent instantiation */ + /** Prevent instantiation */ private TokenTypes() { } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractDeclarationCollector.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractDeclarationCollector.java index a2a59232a..b5fc6db1b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractDeclarationCollector.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractDeclarationCollector.java @@ -244,14 +244,14 @@ public abstract class AbstractDeclarationCollector extends Check { varNames = Sets.newHashSet(); } - /** add a name to the frame. + /** Add a name to the frame. * @param nameToAdd the name we're adding */ void addName(String nameToAdd) { varNames.add(nameToAdd); } - /** check whether the frame contains a given name. + /** Check whether the frame contains a given name. * @param nameToFind the name we're looking for * @return whether it was found */ @@ -259,7 +259,7 @@ public abstract class AbstractDeclarationCollector extends Check { return varNames.contains(nameToFind); } - /** check whether the frame contains a given name. + /** Check whether the frame contains a given name. * @param nameToFind the name we're looking for * @return whether it was found */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractFormatCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractFormatCheck.java index a6708cbf4..cb4f7382b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractFormatCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractFormatCheck.java @@ -36,11 +36,11 @@ import com.puppycrawl.tools.checkstyle.api.Check; */ public abstract class AbstractFormatCheck extends Check { - /** the flags to create the regular expression with */ + /** The flags to create the regular expression with */ private int compileFlags; - /** the regexp to match against */ + /** The regexp to match against */ private Pattern regexp; - /** the format string of the regexp */ + /** The format string of the regexp */ private String format; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractOptionCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractOptionCheck.java index e04265c23..88be0f0db 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractOptionCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractOptionCheck.java @@ -39,7 +39,7 @@ public abstract class AbstractOptionCheck> extends Check { /** Since I cannot get this by going T.class. */ private final Class optionClass; - /** the policy to enforce */ + /** The policy to enforce */ private T option; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java index 165bbbffc..257f340ce 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java @@ -44,10 +44,10 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; */ @Deprecated public abstract class AbstractTypeAwareCheck extends Check { - /** imports details **/ + /** Imports details **/ private final Set imports = Sets.newHashSet(); - /** full identifier for package of the method **/ + /** Full identifier for package of the method **/ private FullIdent packageFullIdent; /** Name of current class. */ @@ -416,13 +416,13 @@ public abstract class AbstractTypeAwareCheck extends Check { /** Represents regular classes/enumes. */ @SuppressWarnings("deprecation") private static final class RegularClass extends AbstractClassInfo { - /** name of surrounding class. */ + /** Name of surrounding class. */ private final String surroundingClass; - /** is class loadable. */ + /** Is class loadable. */ private boolean loadable = true; /** {@code Class} object of this class if it's loadable. */ private Class classObj; - /** the check we use to resolve classes. */ + /** The check we use to resolve classes. */ private final AbstractTypeAwareCheck check; /** @@ -499,11 +499,11 @@ public abstract class AbstractTypeAwareCheck extends Check { * Represents text element with location in the text. */ protected static class Token { - /** token's column number. */ + /** Token's column number. */ private final int column; - /** token's line number. */ + /** Token's line number. */ private final int line; - /** token's text. */ + /** Token's text. */ private final String text; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java index 3db654edc..39d5d8818 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java @@ -32,7 +32,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; * @author lkuehne */ public class ArrayTypeStyleCheck extends Check { - /** controls whether to use Java or C style */ + /** Controls whether to use Java or C style */ private boolean javaStyle = true; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/CheckUtils.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/CheckUtils.java index 048827a27..44ca307ce 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/CheckUtils.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/CheckUtils.java @@ -36,13 +36,13 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; */ public final class CheckUtils { // constants for parseDouble() - /** octal radix */ + /** Octal radix */ private static final int BASE_8 = 8; - /** decimal radix */ + /** Decimal radix */ private static final int BASE_10 = 10; - /** hex radix */ + /** Hex radix */ private static final int BASE_16 = 16; /** Maximum children allowed in setter/getter */ @@ -54,7 +54,7 @@ public final class CheckUtils { /** Maximum nodes allowed in a body of getter */ private static final int GETTER_BODY_SIZE = 2; - /** prevent instances */ + /** Prevent instances */ private CheckUtils() { } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/ClassResolver.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ClassResolver.java index 1ae78790f..a21c96cf5 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/ClassResolver.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ClassResolver.java @@ -30,11 +30,11 @@ import java.util.Set; * @author Oliver Burn */ public class ClassResolver { - /** name of the package to check if the class belongs to **/ + /** Name of the package to check if the class belongs to **/ private final String pkg; - /** set of imports to check against **/ + /** Set of imports to check against **/ private final Set imports; - /** use to load classes **/ + /** Use to load classes **/ private final ClassLoader loader; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java index d93f587a9..646508b40 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java @@ -192,21 +192,21 @@ public class DescendantTokenCheck extends Check { */ public static final String MSG_KEY_SUM_MAX = "descendant.token.sum.max"; - /** minimum depth */ + /** Minimum depth */ private int minimumDepth; - /** maximum depth */ + /** Maximum depth */ private int maximumDepth = Integer.MAX_VALUE; - /** minimum number */ + /** Minimum number */ private int minimumNumber; - /** maximum number */ + /** Maximum number */ private int maximumNumber = Integer.MAX_VALUE; /** Whether to sum the number of tokens found. */ private boolean sumTokenCounts; - /** limited tokens */ + /** Limited tokens */ private int[] limitedTokens = ArrayUtils.EMPTY_INT_ARRAY; - /** error message when minimum count not reached */ + /** Error message when minimum count not reached */ private String minimumMessage; - /** error message when maximum count exceeded */ + /** Error message when maximum count exceeded */ private String maximumMessage; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java index d6604be67..fd592c307 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java @@ -44,7 +44,7 @@ public enum LineSeparatorOption { /** System default line separators. **/ SYSTEM(System.getProperty("line.separator")); - /** the line separator representation */ + /** The line separator representation */ private final byte[] lineSeparator; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java index 4ef00f13b..913fecce0 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java @@ -73,7 +73,7 @@ public class NewlineAtEndOfFileCheck */ public static final String MSG_KEY_NO_NEWLINE_EOF = "noNewlineAtEOF"; - /** the line separator to check against. */ + /** The line separator to check against. */ private LineSeparatorOption lineSeparator = LineSeparatorOption.SYSTEM; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java index fb5346243..d0f48f834 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java @@ -31,7 +31,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; * @author maxvetrenko */ public class OuterTypeFilenameCheck extends Check { - /** indicates whether the first token has been seen in the file. */ + /** Indicates whether the first token has been seen in the file. */ private boolean seenFirstToken; /** Current file name*/ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java index a0bc3879d..d7dde22ae 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java @@ -56,13 +56,13 @@ public class SuppressWarningsHolder */ public static final String CHECKSTYLE_PREFIX = "checkstyle:"; - /** java.lang namespace prefix, which is stripped from SuppressWarnings */ + /** Java.lang namespace prefix, which is stripped from SuppressWarnings */ private static final String JAVA_LANG_PREFIX = "java.lang."; - /** suffix to be removed from subclasses of Check */ + /** Suffix to be removed from subclasses of Check */ private static final String CHECK_SUFFIX = "Check"; - /** a map from check source names to suppression aliases */ + /** A map from check source names to suppression aliases */ private static final Map CHECK_ALIAS_MAP = new HashMap<>(); /** @@ -423,17 +423,17 @@ public class SuppressWarningsHolder "Expression or annotation array initializer AST expected: " + ast); } - /** records a particular suppression for a region of a file */ + /** Records a particular suppression for a region of a file */ private static class Entry { - /** the source name of the suppressed check */ + /** The source name of the suppressed check */ private final String checkName; - /** the suppression region for the check - first line */ + /** The suppression region for the check - first line */ private final int firstLine; - /** the suppression region for the check - first column */ + /** The suppression region for the check - first column */ private final int firstColumn; - /** the suppression region for the check - last line */ + /** The suppression region for the check - last line */ private final int lastLine; - /** the suppression region for the check - last column */ + /** The suppression region for the check - last column */ private final int lastColumn; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java index cb713429c..afae087c8 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java @@ -107,10 +107,10 @@ public class TrailingCommentCheck extends AbstractFormatCheck { */ public static final String MSG_KEY = "trailing.comments"; - /** default format for allowed blank line. */ + /** Default format for allowed blank line. */ private static final String DEFAULT_FORMAT = "^[\\s\\}\\);]*$"; - /** pattern for legal trailing comment. */ + /** Pattern for legal trailing comment. */ private Pattern legalComment; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java index 284a3037a..e76cb726f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java @@ -48,16 +48,16 @@ public class UncommentedMainCheck */ public static final String MSG_KEY = "uncommented.main"; - /** the pattern to exclude classes from the check */ + /** The pattern to exclude classes from the check */ private String excludedClasses = "^$"; - /** compiled regexp to exclude classes from check */ + /** Compiled regexp to exclude classes from check */ private Pattern excludedClassesPattern = Utils.createPattern(excludedClasses); - /** current class name */ + /** Current class name */ private String currentClass; - /** current package */ + /** Current package */ private FullIdent packageName; - /** class definition depth */ + /** Class definition depth */ private int classDepth; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java index 0bd0b2ec3..709a1ecab 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java @@ -96,18 +96,18 @@ public final class MissingDeprecatedCheck extends Check { /** {@link Deprecated Deprecated} annotation name */ private static final String DEPRECATED = "Deprecated"; - /** fully-qualified {@link Deprecated Deprecated} annotation name */ + /** Fully-qualified {@link Deprecated Deprecated} annotation name */ private static final String FQ_DEPRECATED = "java.lang." + DEPRECATED; - /** compiled regexp to match Javadoc tag with no argument * */ + /** Compiled regexp to match Javadoc tag with no argument * */ private static final Pattern MATCH_DEPRECATED = Utils.createPattern("@(deprecated)\\s+\\S"); - /** compiled regexp to match first part of multilineJavadoc tags * */ + /** Compiled regexp to match first part of multilineJavadoc tags * */ private static final Pattern MATCH_DEPRECATED_MULTILINE_START = Utils.createPattern("@(deprecated)\\s*$"); - /** compiled regexp to look for a continuation of the comment * */ + /** Compiled regexp to look for a continuation of the comment * */ private static final Pattern MATCH_DEPRECATED_MULTILINE_CONT = Utils.createPattern("(\\*/|@|[^\\s\\*])"); diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java index 4ec82dd75..f047ab496 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java @@ -92,10 +92,10 @@ public final class MissingOverrideCheck extends Check { /** {@link Override Override} annotation name */ private static final String OVERRIDE = "Override"; - /** fully-qualified {@link Override Override} annotation name */ + /** Fully-qualified {@link Override Override} annotation name */ private static final String FQ_OVERRIDE = "java.lang." + OVERRIDE; - /** compiled regexp to match Javadoc tags with no argument and {} * */ + /** Compiled regexp to match Javadoc tags with no argument and {} * */ private static final Pattern MATCH_INHERITDOC = Utils.createPattern("\\{\\s*@(inheritDoc)\\s*\\}"); diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractNestedDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractNestedDepthCheck.java index 4e14b0ffd..fd1075a7c 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractNestedDepthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractNestedDepthCheck.java @@ -28,9 +28,9 @@ import com.puppycrawl.tools.checkstyle.api.DetailAST; * @author Simon Harris */ public abstract class AbstractNestedDepthCheck extends Check { - /** maximum allowed nesting depth */ + /** Maximum allowed nesting depth */ private int max; - /** current nesting depth */ + /** Current nesting depth */ private int depth; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractSuperCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractSuperCheck.java index 45ad85ce0..42c3288a8 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractSuperCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractSuperCheck.java @@ -45,7 +45,7 @@ public abstract class AbstractSuperCheck */ public static final String MSG_KEY = "missing.super.call"; - /** stack of methods */ + /** Stack of methods */ private final Deque methodStack = Lists.newLinkedList(); @Override @@ -194,10 +194,10 @@ public abstract class AbstractSuperCheck * @author Rick Giles */ private static class MethodNode { - /** method definition */ + /** Method definition */ private final DetailAST method; - /** true if the overriding method calls the super method */ + /** True if the overriding method calls the super method */ private boolean callingSuper; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java index 4589b964c..84ad553c9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java @@ -59,10 +59,10 @@ public class EqualsHashCodeCheck */ public static final String MSG_KEY = "equals.noHashCode"; - /** maps OBJ_BLOCK to the method definition of equals() */ + /** Maps OBJ_BLOCK to the method definition of equals() */ private final Map objBlockEquals = Maps.newHashMap(); - /** the set of OBJ_BLOCKs that contain a definition of hashCode() */ + /** The set of OBJ_BLOCKs that contain a definition of hashCode() */ private final Set objBlockWithHashCode = Sets.newHashSet(); @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java index 63c062ef9..a686da003 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java @@ -135,15 +135,15 @@ public class HiddenFieldCheck */ public static final String MSG_KEY = "hidden.field"; - /** stack of sets of field names, + /** Stack of sets of field names, * one for each class of a set of nested classes. */ private FieldFrame currentFrame; - /** pattern for names of variables and parameters to ignore. */ + /** Pattern for names of variables and parameters to ignore. */ private Pattern regexp; - /** controls whether to check the parameter of a property setter method */ + /** Controls whether to check the parameter of a property setter method */ private boolean ignoreSetter; /** @@ -154,10 +154,10 @@ public class HiddenFieldCheck */ private boolean setterCanReturnItsClass; - /** controls whether to check the parameter of a constructor */ + /** Controls whether to check the parameter of a constructor */ private boolean ignoreConstructorParameter; - /** controls whether to check the parameter of abstract methods. */ + /** Controls whether to check the parameter of abstract methods. */ private boolean ignoreAbstractMethods; @Override @@ -518,19 +518,19 @@ public class HiddenFieldCheck * @author Rick Giles */ private static class FieldFrame { - /** name of the frame, such name of the class or enum declaration */ + /** Name of the frame, such name of the class or enum declaration */ private final String frameName; - /** is this a static inner type */ + /** Is this a static inner type */ private final boolean staticType; - /** parent frame. */ + /** Parent frame. */ private final FieldFrame parent; - /** set of instance field names */ + /** Set of instance field names */ private final Set instanceFields = Sets.newHashSet(); - /** set of static field names */ + /** Set of static field names */ private final Set staticFields = Sets.newHashSet(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java index 4a2f416df..2004832b7 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java @@ -76,16 +76,16 @@ public class IllegalInstantiationCheck /** Set of fully qualified classnames. E.g. "java.lang.Boolean" */ private final Set illegalClasses = Sets.newHashSet(); - /** name of the package */ + /** Name of the package */ private String pkgName; - /** the imports for the file */ + /** The imports for the file */ private final Set imports = Sets.newHashSet(); - /** the class names defined in the file */ + /** The class names defined in the file */ private final Set classNames = Sets.newHashSet(); - /** the instantiations in the file */ + /** The instantiations in the file */ private final Set instantiations = Sets.newHashSet(); @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheck.java index 559ec12b1..415df9c04 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheck.java @@ -62,10 +62,10 @@ public final class IllegalThrowsCheck extends AbstractIllegalCheck { "finalize", }; - /** property for ignoring overridden methods. */ + /** Property for ignoring overridden methods. */ private boolean ignoreOverriddenMethods = true; - /** methods which should be ignored. */ + /** Methods which should be ignored. */ private final Set ignoredMethodNames = Sets.newHashSet(); /** Creates new instance of the check. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java index 17bf16ecf..2d5ca7ae8 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java @@ -130,13 +130,13 @@ public final class IllegalTypeCheck extends AbstractFormatCheck { "getEnvironment", }; - /** illegal classes. */ + /** Illegal classes. */ private final Set illegalClassNames = Sets.newHashSet(); - /** legal abstract classes. */ + /** Legal abstract classes. */ private final Set legalAbstractClassNames = Sets.newHashSet(); - /** methods which should be ignored. */ + /** Methods which should be ignored. */ private final Set ignoredMethodNames = Sets.newHashSet(); - /** check methods and fields with only corresponding modifiers. */ + /** Check methods and fields with only corresponding modifiers. */ private List memberModifiers; /** Creates new instance of the check. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java index fc3cec023..d3402a10e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java @@ -167,7 +167,7 @@ public class MagicNumberCheck extends Check { TokenTypes.MINUS, }; - /** the numbers to ignore in the check, sorted */ + /** The numbers to ignore in the check, sorted */ private double[] ignoreNumbers = {-1, 0, 1, 2}; /** Whether to ignore magic numbers in a hash code method. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheck.java index 721309197..4479991a6 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheck.java @@ -49,7 +49,7 @@ public final class NestedForDepthCheck extends AbstractNestedDepthCheck { */ public static final String MSG_KEY = "nested.for.depth"; - /** default allowed nesting depth. */ + /** Default allowed nesting depth. */ private static final int DEFAULT_MAX = 1; /** Creates new check instance with default allowed nesting depth. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheck.java index f9d153760..086ecbb04 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheck.java @@ -36,7 +36,7 @@ public final class NestedIfDepthCheck extends AbstractNestedDepthCheck { */ public static final String MSG_KEY = "nested.if.depth"; - /** default allowed nesting depth. */ + /** Default allowed nesting depth. */ private static final int DEFAULT_MAX = 1; /** Creates new check instance with default allowed nesting depth. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheck.java index caa33edfb..3b5a8dd4a 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheck.java @@ -34,7 +34,7 @@ public final class NestedTryDepthCheck extends AbstractNestedDepthCheck { */ public static final String MSG_KEY = "nested.try.depth"; - /** default allowed nesting depth */ + /** Default allowed nesting depth */ private static final int DEFAULT_MAX = 1; /** Creates new check instance with default allowed nesting depth. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java index f804afba9..8a196a03a 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java @@ -42,7 +42,7 @@ public final class PackageDeclarationCheck extends Check { /** Line number used to log violation when no AST nodes are present in file. */ private static final int DEFAULT_LINE_NUMBER = 1; - /** is package defined. */ + /** Is package defined. */ private boolean defined; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java index 4e9dcd552..fe03f343a 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java @@ -68,9 +68,9 @@ public class RequireThisCheck extends AbstractDeclarationCollector { */ public static final String MSG_VARIABLE = "require.this.variable"; - /** whether we should check fields usage. */ + /** Whether we should check fields usage. */ private boolean checkFields = true; - /** whether we should check methods usage. */ + /** Whether we should check methods usage. */ private boolean checkMethods = true; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java index 7bba62391..c4518380d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java @@ -104,18 +104,18 @@ public class FinalClassCheck } } - /** maintains information about class' ctors */ + /** Maintains information about class' ctors */ private static final class ClassDesc { - /** is class declared as final */ + /** Is class declared as final */ private final boolean declaredAsFinal; - /** is class declared as abstract */ + /** Is class declared as abstract */ private final boolean declaredAsAbstract; - /** does class have non-provate ctors */ + /** Does class have non-provate ctors */ private boolean withNonPrivateCtor; - /** does class have private ctors */ + /** Does class have private ctors */ private boolean withPrivateCtor; /** @@ -130,12 +130,12 @@ public class FinalClassCheck this.declaredAsAbstract = declaredAsAbstract; } - /** adds private ctor. */ + /** Adds private ctor. */ void reportPrivateCtor() { withPrivateCtor = true; } - /** adds non-private ctor. */ + /** Adds non-private ctor. */ void reportNonPrivateCtor() { withNonPrivateCtor = true; } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java index eb3dc094e..80ff7240e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java @@ -111,20 +111,20 @@ public class HideUtilityClassConstructorCheck extends Check { * Details of class that are required for validation */ private static class Details { - /** class ast */ + /** Class ast */ private final DetailAST ast; - /** result of details gathering */ + /** Result of details gathering */ private boolean hasMethodOrField; - /** result of details gathering */ + /** Result of details gathering */ private boolean hasNonStaticMethodOrField; - /** result of details gathering */ + /** Result of details gathering */ private boolean hasNonPrivateStaticMethodOrField; - /** result of details gathering */ + /** Result of details gathering */ private boolean hasDefaultCtor; - /** result of details gathering */ + /** Result of details gathering */ private boolean hasPublicCtor; - /** c-tor + /** C-tor * @param ast class ast * */ Details(DetailAST ast) { diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheck.java index 47c1af0c3..fb4ab5ada 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheck.java @@ -50,7 +50,7 @@ public final class InterfaceIsTypeCheck */ public static final String MSG_KEY = "interface.type"; - /** flag to control whether marker interfaces are allowed. */ + /** Flag to control whether marker interfaces are allowed. */ private boolean allowMarkerInterfaces = true; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheck.java index d023a99a0..3d6a469ef 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheck.java @@ -60,13 +60,13 @@ public final class ThrowsCountCheck extends Check { */ public static final String MSG_KEY = "throws.count"; - /** default value of max property */ + /** Default value of max property */ private static final int DEFAULT_MAX = 4; - /** whether private methods must be ignored **/ + /** Whether private methods must be ignored **/ private boolean ignorePrivateMethods = true; - /** maximum allowed throws statements */ + /** Maximum allowed throws statements */ private int max; /** Creates new instance of the check. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java index 8247596fc..0e8e1fa8b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java @@ -270,13 +270,13 @@ public class VisibilityModifierCheck "com.google.common.annotations.VisibleForTesting" ); - /** contains explicit access modifiers. */ + /** Contains explicit access modifiers. */ private static final String[] EXPLICIT_MODS = {"public", "private", "protected"}; - /** whether protected members are allowed */ + /** Whether protected members are allowed */ private boolean protectedAllowed; - /** whether package visible members are allowed */ + /** Whether package visible members are allowed */ private boolean packageAllowed; /** @@ -288,7 +288,7 @@ public class VisibilityModifierCheck */ private String publicMemberFormat = "^serialVersionUID$"; - /** regexp for public members that should be ignored */ + /** Regexp for public members that should be ignored */ private Pattern publicMemberPattern = Pattern.compile(publicMemberFormat); /** List of ignore annotations canonical names. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java index 7a5f447c3..5104eaf3e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java @@ -56,7 +56,7 @@ public abstract class AbstractHeaderCheck extends AbstractFileSetCheck { /** Name of a charset to use for loading the header from a file. */ private String charset = System.getProperty("file.encoding", "UTF-8"); - /** the lines of the header file. */ + /** The lines of the header file. */ private final List readerLines = Lists.newArrayList(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java index 26a7447f9..3a17e95d0 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java @@ -45,10 +45,10 @@ public class HeaderCheck extends AbstractHeaderCheck { */ public static final String MSG_MISMATCH = "header.mismatch"; - /** empty array to avoid instantiations. */ + /** Empty array to avoid instantiations. */ private static final int[] EMPTY_INT_ARRAY = new int[0]; - /** the header lines to ignore in the check, sorted. */ + /** The header lines to ignore in the check, sorted. */ private int[] ignoreLines = EMPTY_INT_ARRAY; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java index 2c4c3fd56..ebad40c37 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java @@ -42,13 +42,13 @@ import com.puppycrawl.tools.checkstyle.Utils; * @author o_sukhodolsky */ public class RegexpHeaderCheck extends AbstractHeaderCheck { - /** empty array to avoid instantiations. */ + /** Empty array to avoid instantiations. */ private static final int[] EMPTY_INT_ARRAY = new int[0]; - /** the compiled regular expressions */ + /** The compiled regular expressions */ private final List headerRegexps = Lists.newArrayList(); - /** the header lines to repeat (0 or more) in the check, sorted. */ + /** The header lines to repeat (0 or more) in the check, sorted. */ private int[] multiLines = EMPTY_INT_ARRAY; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportCheck.java index e48c93d5e..f1600f068 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportCheck.java @@ -72,13 +72,13 @@ public class AvoidStarImportCheck */ public static final String MSG_KEY = "import.avoidStar"; - /** the packages/classes to exempt from this check. */ + /** The packages/classes to exempt from this check. */ private final List excludes = Lists.newArrayList(); - /** whether to allow all class imports */ + /** Whether to allow all class imports */ private boolean allowClassImports; - /** whether to allow all static member imports */ + /** Whether to allow all static member imports */ private boolean allowStaticMemberImports; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java index 52a40ce15..0038915bf 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java @@ -73,7 +73,7 @@ public class AvoidStaticImportCheck */ public static final String MSG_KEY = "import.avoidStatic"; - /** the classes/static members to exempt from this check. */ + /** The classes/static members to exempt from this check. */ private String[] excludes = ArrayUtils.EMPTY_STRING_ARRAY; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java index d2be9072b..f83f1ed13 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java @@ -66,7 +66,7 @@ public class IllegalImportCheck */ public static final String MSG_KEY = "import.illegal"; - /** list of illegal packages */ + /** List of illegal packages */ private String[] illegalPkgs; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java index 363d3217b..552053eaf 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java @@ -42,23 +42,23 @@ import com.puppycrawl.tools.checkstyle.api.CheckstyleException; * @author Oliver Burn */ final class ImportControlLoader extends AbstractLoader { - /** the public ID for the configuration dtd */ + /** The public ID for the configuration dtd */ private static final String DTD_PUBLIC_ID_1_0 = "-//Puppy Crawl//DTD Import Control 1.0//EN"; - /** the public ID for the configuration dtd */ + /** The public ID for the configuration dtd */ private static final String DTD_PUBLIC_ID_1_1 = "-//Puppy Crawl//DTD Import Control 1.1//EN"; - /** the resource for the configuration dtd */ + /** The resource for the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_0 = "com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_0.dtd"; - /** the resource for the configuration dtd */ + /** The resource for the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_1 = "com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_1.dtd"; - /** the map to lookup the resource name by the id */ + /** The map to lookup the resource name by the id */ private static final Map DTD_RESOURCE_BY_ID = new HashMap<>(); /** Used to hold the {@link PkgControl} objects. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java index 05e01ea7a..158ef623f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java @@ -190,7 +190,7 @@ public class ImportOrderCheck */ public static final String MSG_ORDERING = "import.ordering"; - /** the special wildcard that catches all remaining groups. */ + /** The special wildcard that catches all remaining groups. */ private static final String WILDCARD_GROUP_NAME = "*"; /** List of import groups specified by the user. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java index 428add90b..169fcfee6 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java @@ -72,11 +72,11 @@ public class RedundantImportCheck */ public static final String MSG_DUPLICATE = "import.duplicate"; - /** name of package in file */ + /** Name of package in file */ private String pkgName; - /** set of the imports */ + /** Set of the imports */ private final Set imports = Sets.newHashSet(); - /** set of static imports */ + /** Set of static imports */ private final Set staticImports = Sets.newHashSet(); @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java index 9ad4c58ea..56cfe1517 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java @@ -59,25 +59,25 @@ public class UnusedImportsCheck extends Check { */ public static final String MSG_KEY = "import.unused"; - /** regex to match class names. */ + /** Regex to match class names. */ private static final Pattern CLASS_NAME = Pattern.compile( "((:?[\\p{L}_$][\\p{L}\\p{N}_$]*\\.)*[\\p{L}_$][\\p{L}\\p{N}_$]*)"); - /** regex to match the first class name. */ + /** Regex to match the first class name. */ private static final Pattern FIRST_CLASS_NAME = Pattern.compile( "^" + CLASS_NAME); - /** regex to match argument names. */ + /** Regex to match argument names. */ private static final Pattern ARGUMENT_NAME = Pattern.compile( "[(,]\\s*" + CLASS_NAME.pattern()); - /** flag to indicate when time to start collecting references. */ + /** Flag to indicate when time to start collecting references. */ private boolean collect; - /** flag whether to process Javdoc comments. */ + /** Flag whether to process Javdoc comments. */ private boolean processingJavadoc; - /** set of the imports. */ + /** Set of the imports. */ private final Set imports = Sets.newHashSet(); - /** set of references - possibly to imports or other things. */ + /** Set of references - possibly to imports or other things. */ private final Set referenced = Sets.newHashSet(); public void setProcessJavadoc(boolean value) { diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java index d8e4964b6..b5a7f8180 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java @@ -61,16 +61,16 @@ public abstract class AbstractExpressionHandler { */ private final IndentationCheck indentCheck; - /** the AST which is handled by this handler */ + /** The AST which is handled by this handler */ private final DetailAST mainAst; - /** name used during output to user */ + /** Name used during output to user */ private final String typeName; - /** containing AST handler */ + /** Containing AST handler */ private final AbstractExpressionHandler parent; - /** indentation amount for this handler */ + /** Indentation amount for this handler */ private IndentLevel level; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java index 1b1bd094e..7cdea70c5 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java @@ -40,7 +40,7 @@ public class HandlerFactory { private final Map> typeHandlers = Maps.newHashMap(); - /** cache for created method call handlers */ + /** Cache for created method call handlers */ private final Map createdHandlers = Maps.newHashMap(); diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java index 2761f3690..8f7c11fc9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java @@ -28,7 +28,7 @@ import java.util.BitSet; * @author o_sukhodolsky */ public class IndentLevel { - /** set of acceptable indentation levels. */ + /** Set of acceptable indentation levels. */ private final BitSet levels = new BitSet(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java index 8b948449c..18f1c8f6b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java @@ -83,22 +83,22 @@ public class IndentationCheck extends Check { /** Default indentation amount - based on Sun */ private static final int DEFAULT_INDENTATION = 4; - /** how many tabs or spaces to use */ + /** How many tabs or spaces to use */ private int basicOffset = DEFAULT_INDENTATION; - /** how much to indent a case label */ + /** How much to indent a case label */ private int caseIndentationAmount = DEFAULT_INDENTATION; - /** how far brace should be indented when on next line */ + /** How far brace should be indented when on next line */ private int braceAdjustment; - /** how far throws should be indented when on next line */ + /** How far throws should be indented when on next line */ private int throwsIndentationAmount = DEFAULT_INDENTATION; - /** how much to indent an array initialization when on next line */ + /** How much to indent an array initialization when on next line */ private int arrayInitIndentationAmount = DEFAULT_INDENTATION; - /** how far continuation line should be indented when line-wrapping is present */ + /** How far continuation line should be indented when line-wrapping is present */ private int lineWrappingIndentation = DEFAULT_INDENTATION; /** @@ -108,10 +108,10 @@ public class IndentationCheck extends Check { */ private boolean forceStrictCondition; - /** handlers currently in use */ + /** Handlers currently in use */ private final Deque handlers = new ArrayDeque<>(); - /** factory from which handlers are distributed */ + /** Factory from which handlers are distributed */ private final HandlerFactory handlerFactory = new HandlerFactory(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java index 6b6ee2757..9008f8792 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java @@ -40,10 +40,10 @@ class HtmlTag { /** The comment line of text where this tag appears. */ private final String text; - /** if this tag is self-closed. */ + /** If this tag is self-closed. */ private final boolean closedTag; - /** if the tag is incomplete. */ + /** If the tag is incomplete. */ private final boolean incomplete; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java index 28a16ef2a..29e72f4a0 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java @@ -100,15 +100,15 @@ public class JavadocMethodCheck extends AbstractTypeAwareCheck { */ public static final String MSG_DUPLICATE_TAG = "javadoc.duplicateTag"; - /** compiled regexp to match Javadoc tags that take an argument * */ + /** Compiled regexp to match Javadoc tags that take an argument * */ private static final Pattern MATCH_JAVADOC_ARG = Utils.createPattern("@(throws|exception|param)\\s+(\\S+)\\s+\\S*"); - /** compiled regexp to match first part of multilineJavadoc tags * */ + /** Compiled regexp to match first part of multilineJavadoc tags * */ private static final Pattern MATCH_JAVADOC_ARG_MULTILINE_START = Utils.createPattern("@(throws|exception|param)\\s+(\\S+)\\s*$"); - /** compiled regexp to look for a continuation of the comment * */ + /** Compiled regexp to look for a continuation of the comment * */ private static final Pattern MATCH_JAVADOC_MULTILINE_CONT = Utils.createPattern("(\\*/|@|[^\\s\\*])"); @@ -117,23 +117,23 @@ public class JavadocMethodCheck extends AbstractTypeAwareCheck { /** Multiline finished at next Javadoc * */ private static final String NEXT_TAG = "@"; - /** compiled regexp to match Javadoc tags with no argument * */ + /** Compiled regexp to match Javadoc tags with no argument * */ private static final Pattern MATCH_JAVADOC_NOARG = Utils.createPattern("@(return|see)\\s+\\S"); - /** compiled regexp to match first part of multilineJavadoc tags * */ + /** Compiled regexp to match first part of multilineJavadoc tags * */ private static final Pattern MATCH_JAVADOC_NOARG_MULTILINE_START = Utils.createPattern("@(return|see)\\s*$"); - /** compiled regexp to match Javadoc tags with no argument and {} * */ + /** Compiled regexp to match Javadoc tags with no argument and {} * */ private static final Pattern MATCH_JAVADOC_NOARG_CURLY = Utils.createPattern("\\{\\s*@(inheritDoc)\\s*\\}"); /** Default value of minimal amount of lines in method to demand documentation presence.*/ private static final int DEFAULT_MIN_LINE_COUNT = -1; - /** the visibility scope where Javadoc comments are checked * */ + /** The visibility scope where Javadoc comments are checked * */ private Scope scope = Scope.PRIVATE; - /** the visibility scope where Javadoc comments shouldn't be checked * */ + /** The visibility scope where Javadoc comments shouldn't be checked * */ private Scope excludeScope; /** Minimal amount of lines in method to demand documentation presence.*/ @@ -921,9 +921,9 @@ public class JavadocMethodCheck extends AbstractTypeAwareCheck { /** Stores useful information about declared exception. */ private static class ExceptionInfo { - /** does the exception have throws tag associated with. */ + /** Does the exception have throws tag associated with. */ private boolean found; - /** class information associated with this exception. */ + /** Class information associated with this exception. */ private final AbstractClassInfo classInfo; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java index e4550ca5c..d83250408 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java @@ -85,7 +85,7 @@ public class JavadocStyleCheck /** The scope to check. */ private Scope scope = Scope.PRIVATE; - /** the visibility scope where Javadoc comments shouldn't be checked **/ + /** The visibility scope where Javadoc comments shouldn't be checked **/ private Scope excludeScope; /** Format for matching the end of a sentence. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java index 2c53574ce..e0656c221 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java @@ -26,13 +26,13 @@ import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo; * @author Oliver Burn */ public class JavadocTag { - /** the line number of the tag **/ + /** The line number of the tag **/ private final int lineNo; - /** the column number of the tag **/ + /** The column number of the tag **/ private final int columnNo; - /** an optional first argument. For example the parameter name. **/ + /** An optional first argument. For example the parameter name. **/ private final String firstArg; - /** the JavadocTagInfo representing this tag **/ + /** The JavadocTagInfo representing this tag **/ private final JavadocTagInfo tagInfo; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java index 6d398c9e2..a210aff6d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java @@ -82,24 +82,24 @@ public class JavadocTypeCheck */ public static final String UNUSED_TAG_GENERAL = "javadoc.unusedTagGeneral"; - /** the scope to check for */ + /** The scope to check for */ private Scope scope = Scope.PRIVATE; - /** the visibility scope where Javadoc comments shouldn't be checked **/ + /** The visibility scope where Javadoc comments shouldn't be checked **/ private Scope excludeScope; - /** compiled regexp to match author tag content **/ + /** Compiled regexp to match author tag content **/ private Pattern authorFormatPattern; - /** compiled regexp to match version tag content **/ + /** Compiled regexp to match version tag content **/ private Pattern versionFormatPattern; - /** regexp to match author tag content */ + /** Regexp to match author tag content */ private String authorFormat; - /** regexp to match version tag content */ + /** Regexp to match version tag content */ private String versionFormat; /** * controls whether to ignore errors when a method has type parameters but * does not have matching param tags in the javadoc. Defaults to false. */ private boolean allowMissingParamTags; - /** controls whether to flag errors for unknown tags. Defaults to false. */ + /** Controls whether to flag errors for unknown tags. Defaults to false. */ private boolean allowUnknownTags; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtils.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtils.java index 741602993..2ccd96433 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtils.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtils.java @@ -41,9 +41,9 @@ import com.puppycrawl.tools.checkstyle.api.TextBlock; * @author Lyle Hanson */ public final class JavadocUtils { - /** maps from a token name to value */ + /** Maps from a token name to value */ private static final ImmutableMap TOKEN_NAME_TO_VALUE; - /** maps from a token value to name */ + /** Maps from a token value to name */ private static final String[] TOKEN_VALUE_TO_NAME; // Using reflection gets all token names and values from JavadocTokenTypes class @@ -84,7 +84,7 @@ public final class JavadocUtils { TOKEN_VALUE_TO_NAME = tempTokenValueToName; } - /** prevent instantiation */ + /** Prevent instantiation */ private JavadocUtils() { } @@ -171,11 +171,11 @@ public final class JavadocUtils { * The type of Javadoc tag we want returned. */ public enum JavadocTagType { - /** block type. */ + /** Block type. */ BLOCK, - /** inline type. */ + /** Inline type. */ INLINE, - /** all validTags. */ + /** All validTags. */ ALL } diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java index acad026fa..783860dfa 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java @@ -44,13 +44,13 @@ public class JavadocVariableCheck */ public static final String JAVADOC_MISSING = "javadoc.missing"; - /** the scope to check */ + /** The scope to check */ private Scope scope = Scope.PRIVATE; - /** the visibility scope where Javadoc comments shouldn't be checked **/ + /** The visibility scope where Javadoc comments shouldn't be checked **/ private Scope excludeScope; - /** the pattern to ignore variable name */ + /** The pattern to ignore variable name */ private Pattern ignoreNamePattern; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SingleLineJavadocCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SingleLineJavadocCheck.java index 4138e2225..c40d5a33e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SingleLineJavadocCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SingleLineJavadocCheck.java @@ -70,7 +70,7 @@ public class SingleLineJavadocCheck extends AbstractJavadocCheck { */ private List ignoredTags = new ArrayList<>(); - /** whether inline tags must be ignored **/ + /** Whether inline tags must be ignored **/ private boolean ignoreInlineTags = true; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java index ce4789270..eaea6414a 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java @@ -267,9 +267,9 @@ class TagParser { * @author o_sukholsky */ private static final class Point { - /** line number. */ + /** Line number. */ private final int line; - /** column number.*/ + /** Column number.*/ private final int column; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java index dd1637020..e9350cd3d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java @@ -86,16 +86,16 @@ public class WriteTagCheck */ public static final String TAG_FORMAT = "type.tagFormat"; - /** compiled regexp to match tag **/ + /** Compiled regexp to match tag **/ private Pattern tagRE; - /** compiled regexp to match tag content **/ + /** Compiled regexp to match tag content **/ private Pattern tagFormatRE; - /** regexp to match tag */ + /** Regexp to match tag */ private String tag; - /** regexp to match tag content */ + /** Regexp to match tag content */ private String tagFormat; - /** the severity level of found tag reports */ + /** The severity level of found tag reports */ private SeverityLevel tagSeverityLevel = SeverityLevel.INFO; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java index fe5fd2b38..3f726fff4 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java @@ -65,7 +65,7 @@ public abstract class AbstractClassCouplingCheck extends Check { private Set excludedClasses = DEFAULT_EXCLUDED_CLASSES; /** Allowed complexity. */ private int max; - /** package of the file we check. */ + /** Package of the file we check. */ private String packageName; /** Stack of contexts. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java index 660399b2f..64aac59de 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java @@ -35,16 +35,16 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; */ public abstract class AbstractComplexityCheck extends Check { - /** the initial current value */ + /** The initial current value */ private static final BigInteger INITIAL_VALUE = BigInteger.ONE; - /** stack of values - all but the current value */ + /** Stack of values - all but the current value */ private final Deque valueStack = new ArrayDeque<>(); - /** the current value */ + /** The current value */ private BigInteger currentValue = BigInteger.ZERO; - /** threshold to report error for */ + /** Threshold to report error for */ private int max; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheck.java index c33266c53..57840e78e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheck.java @@ -37,7 +37,7 @@ public final class ClassFanOutComplexityCheck extends AbstractClassCouplingCheck */ public static final String MSG_KEY = "classFanOutComplexity"; - /** default value of max value. */ + /** Default value of max value. */ private static final int DEFAULT_MAX = 20; /** Creates new instance of this check. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java index ddf8e567d..05f0ee996 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java @@ -44,7 +44,7 @@ public class CyclomaticComplexityCheck */ public static final String MSG_KEY = "cyclomaticComplexity"; - /** default allowed complexity */ + /** Default allowed complexity */ private static final int DEFAULT_VALUE = 10; /** Create an instance. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java index 4e38b54ef..b6a82e1f9 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java @@ -58,25 +58,25 @@ public class JavaNCSSCheck extends Check { */ public static final String MSG_FILE = "ncss.file"; - /** default constant for max file ncss */ + /** Default constant for max file ncss */ private static final int FILE_MAX_NCSS = 2000; - /** default constant for max file ncss */ + /** Default constant for max file ncss */ private static final int CLASS_MAX_NCSS = 1500; - /** default constant for max method ncss */ + /** Default constant for max method ncss */ private static final int METHOD_MAX_NCSS = 50; - /** maximum ncss for a complete source file */ + /** Maximum ncss for a complete source file */ private int fileMaximum = FILE_MAX_NCSS; - /** maximum ncss for a class */ + /** Maximum ncss for a class */ private int classMaximum = CLASS_MAX_NCSS; - /** maximum ncss for a method */ + /** Maximum ncss for a method */ private int methodMaximum = METHOD_MAX_NCSS; - /** list containing the stacked counters */ + /** List containing the stacked counters */ private Deque counters; @Override @@ -371,7 +371,7 @@ public class JavaNCSSCheck extends Check { * Class representing a counter, */ private static class Counter { - /** the counters internal integer */ + /** The counters internal integer */ private int ivCount; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java index c01730b7e..d5ed3f621 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java @@ -56,10 +56,10 @@ public final class AbstractClassNameCheck extends AbstractFormatCheck { /** Default format for abstract class names */ private static final String DEFAULT_FORMAT = "^Abstract.+$"; - /** whether to ignore checking the modifier */ + /** Whether to ignore checking the modifier */ private boolean ignoreModifier; - /** whether to ignore checking the name */ + /** Whether to ignore checking the name */ private boolean ignoreName; /** Creates new instance of the check. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpCheck.java index 09690af1c..9120e6629 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpCheck.java @@ -201,7 +201,7 @@ public class RegexpCheck extends AbstractFormatCheck { findMatch(); } - /** recursive method that finds the matches. */ + /** Recursive method that finds the matches. */ private void findMatch() { final boolean foundMatch = matcher.find(); diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheck.java index 0573935cc..6c1094a9c 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheck.java @@ -64,10 +64,10 @@ public class AnonInnerLengthCheck extends Check { */ public static final String MSG_KEY = "maxLen.anonInner"; - /** default maximum number of lines */ + /** Default maximum number of lines */ private static final int DEFAULT_MAX = 20; - /** maximum number of lines */ + /** Maximum number of lines */ private int max = DEFAULT_MAX; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java index 8c95d0382..21ea5e012 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java @@ -40,10 +40,10 @@ public final class ExecutableStatementCountCheck */ public static final String MSG_KEY = "executableStatementCount"; - /** default threshold */ + /** Default threshold */ private static final int DEFAULT_MAX = 30; - /** threshold to report error for */ + /** Threshold to report error for */ private int max; /** Stack of method contexts. */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java index 81cea7cf6..2518acc30 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java @@ -62,10 +62,10 @@ public class FileLengthCheck extends AbstractFileSetCheck { */ public static final String MSG_KEY = "maxLen.file"; - /** default maximum number of lines */ + /** Default maximum number of lines */ private static final int DEFAULT_MAX_LINES = 2000; - /** the maximum number of lines */ + /** The maximum number of lines */ private int maxFileLength = DEFAULT_MAX_LINES; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java index 3c99907ba..72f72ce98 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java @@ -83,13 +83,13 @@ public class LineLengthCheck extends Check { */ public static final String MSG_KEY = "maxLineLen"; - /** default maximum number of columns in a line */ + /** Default maximum number of columns in a line */ private static final int DEFAULT_MAX_COLUMNS = 80; - /** the maximum number of columns in a line */ + /** The maximum number of columns in a line */ private int max = DEFAULT_MAX_COLUMNS; - /** the regexp when long lines are ignored */ + /** The regexp when long lines are ignored */ private Pattern ignorePattern; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java index 772097cde..514ffc7bf 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java @@ -68,7 +68,7 @@ public final class MethodCountCheck extends Check { */ public static final String MSG_MANY_METHODS = "too.many.methods"; - /** default maximum number of methods */ + /** Default maximum number of methods */ private static final int DEFAULT_MAX_METHODS = 100; /** Maximum private methods. */ private int maxPrivate = DEFAULT_MAX_METHODS; @@ -216,9 +216,9 @@ public final class MethodCountCheck extends Check { private static class MethodCounter { /** Maintains the counts. */ private final Map counts = new EnumMap<>(Scope.class); - /** indicated is an interface, in which case all methods are public */ + /** Indicated is an interface, in which case all methods are public */ private final boolean inInterface; - /** tracks the total. */ + /** Tracks the total. */ private int total; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java index 080cb3e8f..04012cea1 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java @@ -64,13 +64,13 @@ public class MethodLengthCheck extends Check { */ public static final String MSG_KEY = "maxLen.method"; - /** default maximum number of lines */ + /** Default maximum number of lines */ private static final int DEFAULT_MAX_LINES = 150; - /** whether to ignore empty lines and single line comments */ + /** Whether to ignore empty lines and single line comments */ private boolean countEmpty = true; - /** the maximum number of lines */ + /** The maximum number of lines */ private int max = DEFAULT_MAX_LINES; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java index c86a7f586..92942516d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java @@ -76,16 +76,16 @@ public class ParameterNumberCheck /** {@link Override Override} annotation name */ private static final String OVERRIDE = "Override"; - /** canonical {@link Override Override} annotation name */ + /** Canonical {@link Override Override} annotation name */ private static final String CANONICAL_OVERRIDE = "java.lang." + OVERRIDE; - /** default maximum number of allowed parameters */ + /** Default maximum number of allowed parameters */ private static final int DEFAULT_MAX_PARAMETERS = 7; - /** the maximum number of allowed parameters */ + /** The maximum number of allowed parameters */ private int max = DEFAULT_MAX_PARAMETERS; - /** ignore overridden methods */ + /** Ignore overridden methods */ private boolean ignoreOverriddenMethods; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java index bb43768f5..dc96acae7 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java @@ -179,7 +179,7 @@ public class WhitespaceAroundCheck extends Check { private boolean allowEmptyTypes; /** Whether or not empty loops are allowed*/ private boolean allowEmptyLoops; - /** whether or not to ignore a colon in a enhanced for loop */ + /** Whether or not to ignore a colon in a enhanced for loop */ private boolean ignoreEnhancedForColon = true; @Override diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java index af6d40ea5..8a363338f 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java @@ -35,7 +35,7 @@ import com.google.common.collect.Sets; * @author o_sukhodolsky */ class CSVFilter implements IntFilter { - /** filter set */ + /** Filter set */ private final Set filters = Sets.newHashSet(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilter.java index cbf2366d2..d0667b63d 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilter.java @@ -24,7 +24,7 @@ package com.puppycrawl.tools.checkstyle.filters; * @author Rick Giles */ class IntMatchFilter implements IntFilter { - /** the matching Integer */ + /** The matching Integer */ private final int matchValue; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilter.java index 16f9ad0fc..ee523980e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilter.java @@ -26,10 +26,10 @@ import java.util.Objects; * @author Rick Giles */ class IntRangeFilter implements IntFilter { - /** lower bound of the range */ + /** Lower bound of the range */ private final Integer lowerBound; - /** upper bound of the range */ + /** Upper bound of the range */ private final Integer upperBound; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilter.java index e14a1d39b..d3168dd4e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilter.java @@ -33,10 +33,10 @@ import com.puppycrawl.tools.checkstyle.api.SeverityLevel; public class SeverityMatchFilter extends AutomaticBean implements Filter { - /** the severity level to accept */ + /** The severity level to accept */ private SeverityLevel severityLevel = SeverityLevel.ERROR; - /** whether to accept or reject on severity matches */ + /** Whether to accept or reject on severity matches */ private boolean acceptOnMatch = true; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java index 17d024637..44e9f7828 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java @@ -41,28 +41,28 @@ import com.puppycrawl.tools.checkstyle.api.Filter; */ public class SuppressElement implements Filter { - /** the regexp to match file names against */ + /** The regexp to match file names against */ private final Pattern fileRegexp; - /** the pattern for file names*/ + /** The pattern for file names*/ private final String filePattern; - /** the regexp to match check names against */ + /** The regexp to match check names against */ private Pattern checkRegexp; - /** the pattern for check class names*/ + /** The pattern for check class names*/ private String checkPattern; - /** module id filter. */ + /** Module id filter. */ private String moduleId; - /** line number filter */ + /** Line number filter */ private CSVFilter lineFilter; /** CSV for line number filter */ private String linesCSV; - /** column number filter */ + /** Column number filter */ private CSVFilter columnFilter; /** CSV for column number filter */ diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java index bff01f42c..34d132015 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java @@ -37,7 +37,7 @@ import com.puppycrawl.tools.checkstyle.api.FilterSet; public class SuppressionFilter extends AutomaticBean implements Filter { - /** set of individual suppresses */ + /** Set of individual suppresses */ private FilterSet filters = new FilterSet(); /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java index b33170554..a6bf4e56e 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java @@ -46,16 +46,16 @@ import com.puppycrawl.tools.checkstyle.api.FilterSet; */ public final class SuppressionsLoader extends AbstractLoader { - /** the public ID for the configuration dtd */ + /** The public ID for the configuration dtd */ private static final String DTD_PUBLIC_ID_1_0 = "-//Puppy Crawl//DTD Suppressions 1.0//EN"; - /** the resource for the configuration dtd */ + /** The resource for the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_0 = "com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd"; - /** the public ID for the configuration dtd */ + /** The public ID for the configuration dtd */ private static final String DTD_PUBLIC_ID_1_1 = "-//Puppy Crawl//DTD Suppressions 1.1//EN"; - /** the resource for the configuration dtd */ + /** The resource for the configuration dtd */ private static final String DTD_RESOURCE_NAME_1_1 = "com/puppycrawl/tools/checkstyle/suppressions_1_1.dtd"; diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java index 2404006f8..b22636aea 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java @@ -33,9 +33,9 @@ import com.puppycrawl.tools.checkstyle.api.DetailAST; public class CodeSelector { /** DetailAST node*/ private final DetailAST ast; - /** editor */ + /** Editor */ private final JTextArea editor; - /** mapping */ + /** Mapping */ private final List lines2position; /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/JTreeTable.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/JTreeTable.java index 8d74dc06d..377f4a192 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/gui/JTreeTable.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/JTreeTable.java @@ -194,7 +194,7 @@ public class JTreeTable extends JTable { /** Last table/tree row asked to renderer. */ private int visibleRow; - /** creates a new instance */ + /** Creates a new instance */ public TreeTableCellRenderer(TreeModel model) { super(model); } diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/DebugAuditAdapter.java b/src/test/java/com/puppycrawl/tools/checkstyle/DebugAuditAdapter.java index 082af011e..f5f840de8 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/DebugAuditAdapter.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/DebugAuditAdapter.java @@ -9,7 +9,7 @@ import com.puppycrawl.tools.checkstyle.api.AuditEvent; import com.puppycrawl.tools.checkstyle.api.AuditListener; class DebugAuditAdapter implements AuditListener { - /** keeps track of the number of errors */ + /** Keeps track of the number of errors */ private boolean called; public boolean wasCalled() { diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java index ed4eba302..224d8498b 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java @@ -103,7 +103,7 @@ public class HiddenFieldCheckTest verify(checkConfig, getPath("InputHiddenField.java"), expected); } - /** tests ignoreFormat property */ + /** Tests ignoreFormat property */ @Test public void testIgnoreFormat() throws Exception { @@ -144,7 +144,7 @@ public class HiddenFieldCheckTest verify(checkConfig, getPath("InputHiddenField.java"), expected); } - /** tests ignoreSetter property */ + /** Tests ignoreSetter property */ @Test public void testIgnoreSetter() throws Exception { @@ -187,7 +187,7 @@ public class HiddenFieldCheckTest verify(checkConfig, getPath("InputHiddenField.java"), expected); } - /** tests ignoreSetter and setterCanReturnItsClass properties */ + /** Tests ignoreSetter and setterCanReturnItsClass properties */ @Test public void testIgnoreChainSetter() throws Exception { @@ -229,7 +229,7 @@ public class HiddenFieldCheckTest verify(checkConfig, getPath("InputHiddenField.java"), expected); } - /** tests ignoreConstructorParameter property */ + /** Tests ignoreConstructorParameter property */ @Test public void testIgnoreConstructorParameter() throws Exception { diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java index 496c3a358..a8a7d0e2a 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java @@ -70,7 +70,7 @@ public class HideUtilityClassConstructorCheckTest verify(checkConfig, getPath("design" + File.separator + "UtilityClassConstructorPrivate.java"), expected); } - /** nonstatic methods - always OK */ + /** Nonstatic methods - always OK */ @Test public void testNonUtilClass() throws Exception { final DefaultConfiguration checkConfig =