From 984eb8d7427038effd8ee8d2d9c90c74eee57e2b Mon Sep 17 00:00:00 2001 From: Oleg Sukhodolsky Date: Wed, 8 Oct 2003 17:46:58 +0000 Subject: [PATCH] ExplicitInitialization added to checkstyle's style. Fixed problems it found. --- docs/checkstyle_checks.xml | 1 + .../puppycrawl/tools/checkstyle/CheckStyleTask.java | 8 ++++---- .../com/puppycrawl/tools/checkstyle/Checker.java | 6 +++--- .../tools/checkstyle/ConfigurationLoader.java | 4 ++-- .../puppycrawl/tools/checkstyle/StringArrayReader.java | 8 ++++---- .../tools/checkstyle/api/AbstractFileSetCheck.java | 2 +- .../com/puppycrawl/tools/checkstyle/api/Check.java | 2 +- .../tools/checkstyle/api/CheckstyleException.java | 2 +- .../com/puppycrawl/tools/checkstyle/api/DetailAST.java | 2 +- .../checkstyle/checks/AbstractTypeAwareCheck.java | 2 +- .../tools/checkstyle/checks/DescendantTokenCheck.java | 4 ++-- .../checkstyle/checks/GenericIllegalRegexpCheck.java | 2 +- .../tools/checkstyle/checks/HeaderCheck.java | 2 +- .../tools/checkstyle/checks/RegexpHeaderCheck.java | 2 +- .../checks/blocks/AvoidNestedBlocksCheck.java | 2 +- .../checkstyle/checks/coding/HiddenFieldCheck.java | 6 +++--- .../checks/coding/IllegalInstantiationCheck.java | 2 +- .../checkstyle/checks/coding/RedundantThrowsCheck.java | 4 ++-- .../checks/design/VisibilityModifierCheck.java | 6 +++--- .../checks/duplicates/StrictDuplicateCodeCheck.java | 4 ++-- .../checks/indentation/IndentationCheck.java | 2 +- .../checkstyle/checks/javadoc/JavadocMethodCheck.java | 10 +++++----- .../checkstyle/checks/javadoc/JavadocTypeCheck.java | 8 ++++---- .../checkstyle/checks/usage/AbstractUsageCheck.java | 2 +- .../checks/whitespace/NoWhitespaceBeforeCheck.java | 2 +- .../tools/checkstyle/filters/SuppressElement.java | 8 ++++---- src/checkstyle/com/puppycrawl/tools/checkstyle/java.g | 6 +++--- 27 files changed, 55 insertions(+), 54 deletions(-) diff --git a/docs/checkstyle_checks.xml b/docs/checkstyle_checks.xml index d057df67d..27aa0a0de 100644 --- a/docs/checkstyle_checks.xml +++ b/docs/checkstyle_checks.xml @@ -132,5 +132,6 @@ + diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java index db67504fd..0d7ae3667 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java @@ -67,13 +67,13 @@ public class CheckStyleTask private String mConfigLocation; /** contains package names */ - private File mPackageNamesFile = null; + private File mPackageNamesFile; /** whether to fail build on violations */ private boolean mFailOnViolation = true; /** property to set on violations */ - private String mFailureProperty = null; + private String mFailureProperty; /** contains the filesets to process */ private final List mFileSets = new ArrayList(); @@ -455,9 +455,9 @@ public class CheckStyleTask public static class Formatter { /** the formatter type */ - private FormatterType mFormatterType = null; + private FormatterType mFormatterType; /** the file to output to */ - private File mToFile = null; + private File mToFile; /** * Set the type of the formatter. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/Checker.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/Checker.java index b4ae873f6..7a213fa10 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/Checker.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/Checker.java @@ -54,7 +54,7 @@ public class Checker extends AutomaticBean private class ErrorCounter implements AuditListener { /** keeps track of the number of errors */ - private int mCount = 0; + private int mCount; /** @see AuditListener */ public void addError(AuditEvent aEvt) @@ -334,8 +334,8 @@ public class Checker extends AutomaticBean if (!onNetWare) { if (!aPath.startsWith(File.separator) && !(aPath.length() >= 2 - && Character.isLetter(aPath.charAt(0)) - && colon == 1)) + && Character.isLetter(aPath.charAt(0)) + && colon == 1)) { String msg = aPath + " is not an absolute path"; throw new IllegalArgumentException(msg); diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java index cf4e9e0d3..1d8ffe659 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java @@ -143,14 +143,14 @@ public final class ConfigurationLoader } /** the SAX document handler */ - private InternalLoader mSaxHandler = null; + private InternalLoader mSaxHandler; /** property resolver **/ private final PropertyResolver mOverridePropsResolver; /** the loaded configurations **/ private final Stack mConfigStack = new Stack(); /** the Configuration that is being built */ - private Configuration mConfiguration = null; + private Configuration mConfiguration; /** diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/StringArrayReader.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/StringArrayReader.java index 5eab9bcbd..d61659acf 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/StringArrayReader.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/StringArrayReader.java @@ -37,16 +37,16 @@ final class StringArrayReader extends Reader private final String[] mUnderlyingArray; /** the index of the currently read String */ - private int mArrayIdx = 0; + private int mArrayIdx; /** the index of the next character to be read */ - private int mStringIdx = 0; + private int mStringIdx; /** flag to tell whether an implicit newline has to be reported */ - private boolean mUnreportedNewline = false; + private boolean mUnreportedNewline; /** flag to tell if the reader has been closed */ - private boolean mClosed = false; + private boolean mClosed; /** * Creates a new StringArrayReader. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java index a825e341c..4d803bc6e 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java @@ -32,7 +32,7 @@ public abstract class AbstractFileSetCheck implements FileSetCheck { /** The dispatcher errors are fired to. */ - private MessageDispatcher mDispatcher = null; + private MessageDispatcher mDispatcher; /** the file extensions that are accepted by this filter */ private String[] mFileExtensions = {}; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Check.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Check.java index ecb2c5c0d..b44411324 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Check.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/Check.java @@ -36,7 +36,7 @@ public abstract class Check extends AbstractViolationReporter private static final int DEFAULT_TAB_WIDTH = 8; /** the current file contents */ - private FileContents mFileContents = null; + private FileContents mFileContents; /** the tokens the check is interested in */ private final Set mTokens = new HashSet(); diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/CheckstyleException.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/CheckstyleException.java index f4c2a47bb..dbac8841c 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/CheckstyleException.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/CheckstyleException.java @@ -27,7 +27,7 @@ package com.puppycrawl.tools.checkstyle.api; public class CheckstyleException extends Exception { /** the cause of this exception */ - private Throwable mCause = null; + private Throwable mCause; /** * Creates a new CheckstyleException instance. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/DetailAST.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/DetailAST.java index 1ac6bd2a7..7ff9a9d80 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/DetailAST.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/DetailAST.java @@ -56,7 +56,7 @@ public final class DetailAST * Token 'x' (where x is an int) is in this branch * if mBranchTokenTypes.get(x) is true. */ - private BitSet mBranchTokenTypes = null; + private BitSet mBranchTokenTypes; /** @see antlr.CommonAST **/ public void initialize(Token aTok) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java index b29487e2a..b967e31d3 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java @@ -41,7 +41,7 @@ public abstract class AbstractTypeAwareCheck private Set mImports = new HashSet(); /** full identifier for package of the method **/ - private FullIdent mPackageFullIdent = null; + private FullIdent mPackageFullIdent; /** ClassResolver instance for current tree. */ private ClassResolver mClassResolver; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java index 1184a65ff..6879e926c 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java @@ -167,13 +167,13 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; public class DescendantTokenCheck extends Check { /** minimum depth */ - private int mMinimumDepth = 0; + private int mMinimumDepth; /** maximum depth */ private int mMaximumDepth = Integer.MAX_VALUE; /** minimum number */ - private int mMinimumNumber = 0; + private int mMinimumNumber; /** maximum number */ private int mMaximumNumber = Integer.MAX_VALUE; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/GenericIllegalRegexpCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/GenericIllegalRegexpCheck.java index f9f6b3e8f..a9ce69b9e 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/GenericIllegalRegexpCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/GenericIllegalRegexpCheck.java @@ -53,7 +53,7 @@ public class GenericIllegalRegexpCheck extends AbstractFormatCheck private String mMessage = ""; /** case insensitive? **/ - private boolean mIgnoreCase = false; + private boolean mIgnoreCase; /** * Setter for message property. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/HeaderCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/HeaderCheck.java index ec13b05c0..d56525e0d 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/HeaderCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/HeaderCheck.java @@ -80,7 +80,7 @@ public class HeaderCheck private static final int[] EMPTY_INT_ARRAY = new int[0]; /** the lines of the header file */ - private String[] mHeaderLines = null; + private String[] mHeaderLines; /** the header lines to ignore in the check, sorted */ private int[] mIgnoreLines = EMPTY_INT_ARRAY; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/RegexpHeaderCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/RegexpHeaderCheck.java index 2bd9db8a6..607c3e5de 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/RegexpHeaderCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/RegexpHeaderCheck.java @@ -67,7 +67,7 @@ import com.puppycrawl.tools.checkstyle.api.Utils; public class RegexpHeaderCheck extends HeaderCheck { /** the compiled regular expressions */ - private RE[] mHeaderRegexps = null; + private RE[] mHeaderRegexps; /** * Sets the file that contains the header to check against. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheck.java index 2127168cd..cdcad1ae9 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheck.java @@ -89,7 +89,7 @@ public class AvoidNestedBlocksCheck extends Check * Whether nested blocks are allowed if they are the * only child of a switch case. */ - private boolean mAllowInSwitchCase = false; + private boolean mAllowInSwitchCase; /** @see Check */ public int[] getDefaultTokens() diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java index 045302e85..2cf596e32 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java @@ -82,13 +82,13 @@ public class HiddenFieldCheck private LinkedList mFieldsStack = new LinkedList(); /** the regexp to match against */ - private RE mRegexp = null; + private RE mRegexp; /** controls whether to check the parameter of a property setter method */ - private boolean mIgnoreSetter = false; + private boolean mIgnoreSetter; /** controls whether to check the parameter of a constructor */ - private boolean mIgnoreConstructorParameter = false; + private boolean mIgnoreConstructorParameter; /** @see com.puppycrawl.tools.checkstyle.api.Check */ public int[] getDefaultTokens() diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java index fbcc4389e..fff4b260b 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java @@ -67,7 +67,7 @@ public class IllegalInstantiationCheck private final Set mIllegalClasses = new HashSet(); /** name of the package */ - private String mPkgName = null; + private String mPkgName; /** the imports for the file */ private final Set mImports = new HashSet(); diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java index 566a56fb3..85c408d46 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java @@ -49,13 +49,13 @@ public class RedundantThrowsCheck * whether unchecked exceptions in throws * are allowed or not */ - private boolean mAllowUnchecked = false; + private boolean mAllowUnchecked; /** * whether subclass of another declared * exception is allowed in throws clause */ - private boolean mAllowSubclasses = false; + private boolean mAllowSubclasses; /** * Getter for allowUnchecked property. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java index 11219cb0a..d405e2b18 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java @@ -46,10 +46,10 @@ public class VisibilityModifierCheck extends Check { /** whether protected members are allowed */ - private boolean mProtectedAllowed = false; + private boolean mProtectedAllowed; /** whether package visible members are allowed */ - private boolean mPackageAllowed = false; + private boolean mPackageAllowed; /** * pattern for public members that should be ignored. Note: @@ -61,7 +61,7 @@ public class VisibilityModifierCheck private String mPublicMemberPattern = "^serialVersionUID$"; /** regexp for public members that should be ignored */ - private RE mPublicMemberRE = null; + private RE mPublicMemberRE; /** Create an instance. */ public VisibilityModifierCheck() diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheck.java index 11c11ca9b..c481ef4fa 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheck.java @@ -172,10 +172,10 @@ public final class StrictDuplicateCodeCheck extends AbstractFileSetCheck private int mLoc; /** number of chache misses */ - private long mCacheMisses = 0; + private long mCacheMisses; /** number of cache hits */ - private long mCacheHits = 0; + private long mCacheHits; /** Creates a new instance of this class. */ public StrictDuplicateCodeCheck() diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java index bdffe0ceb..51f528398 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java @@ -118,7 +118,7 @@ public class IndentationCheck extends Check private int mCaseIndentationAmount = DEFAULT_INDENTATION; /** how far brace should be indented when on next line */ - private int mBraceAdjustment = 0; + private int mBraceAdjustment; /** handlers currently in use */ private ArrayStack mHandlers = new ArrayStack(); diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java index 6e08e1de5..454f0240d 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java @@ -143,35 +143,35 @@ public class JavadocMethodCheck * are not declared if they are a subclass of * java.lang.RuntimeException. **/ - private boolean mAllowUndeclaredRTE = false; + private boolean mAllowUndeclaredRTE; /** * controls whether to allow documented exceptions that * are subclass of one of declared exception. * Defaults to false (backward compatibility). **/ - private boolean mAllowThrowsTagsForSubclasses = false; + private boolean mAllowThrowsTagsForSubclasses; /** * controls whether to ignore errors when a method has parameters * but does not have matching param tags in the javadoc. * Defaults to false. **/ - private boolean mAllowMissingParamTags = false; + private boolean mAllowMissingParamTags; /** * controls whether to ignore errors when a method declares that * it throws exceptions but does not have matching throws tags * in the javadoc. Defaults to false. **/ - private boolean mAllowMissingThrowsTags = false; + private boolean mAllowMissingThrowsTags; /** * controls whether to ignore errors when a method returns * non-void type but does not have a return tag in the javadoc. * Defaults to false. **/ - private boolean mAllowMissingReturnTag = false; + private boolean mAllowMissingReturnTag; /** * Set the scope. diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java index a31e12438..7a90759d1 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java @@ -84,13 +84,13 @@ public class JavadocTypeCheck /** the scope to check for */ private Scope mScope = Scope.PRIVATE; /** compiled regexp to match author tag **/ - private RE mAuthorTagRE = null; + private RE mAuthorTagRE; /** compiled regexp to match author tag content **/ - private RE mAuthorFormatRE = null; + private RE mAuthorFormatRE; /** compiled regexp to match version tag **/ - private RE mVersionTagRE = null; + private RE mVersionTagRE; /** compiled regexp to match version tag content **/ - private RE mVersionFormatRE = null; + private RE mVersionFormatRE; /** regexp to match author tag content */ private String mAuthorFormat; /** regexp to match version tag content */ diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/AbstractUsageCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/AbstractUsageCheck.java index 5292c6639..a5610091e 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/AbstractUsageCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/AbstractUsageCheck.java @@ -42,7 +42,7 @@ public abstract class AbstractUsageCheck extends Check { /** the regexp to match against */ - private RE mRegexp = null; + private RE mRegexp; /** the format string of the regexp */ private String mIgnoreFormat; diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java index 253c1ff65..56b8c4187 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java @@ -61,7 +61,7 @@ public class NoWhitespaceBeforeCheck extends Check { /** Whether whitespace is allowed if the AST is at a linebreak */ - private boolean mAllowLineBreaks = false; + private boolean mAllowLineBreaks; /** @see com.puppycrawl.tools.checkstyle.api.Check */ public int[] getDefaultTokens() diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java index 6ed6f443e..060485636 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java @@ -55,16 +55,16 @@ public class SuppressElement private String mCheckPattern; /** line number filter */ - private CSVFilter mLineFilter = null; + private CSVFilter mLineFilter; /** CSV for line number filter */ - private String mLinesCSV = null; + private String mLinesCSV; /** column number filter */ - private CSVFilter mColumnFilter = null; + private CSVFilter mColumnFilter; /** CSV for column number filter */ - private String mColumnsCSV = null; + private String mColumnsCSV; /** * Constructs a SuppressElement for a diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/java.g b/src/checkstyle/com/puppycrawl/tools/checkstyle/java.g index dad6e26ac..ebf58ecd8 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/java.g +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/java.g @@ -290,9 +290,9 @@ field! | v:variableDefinitions[#mods,#t] s6:SEMI // {#field = #(#[VARIABLE_DEF,"VARIABLE_DEF"], v);} { - #field = #v; - #v.addChild(#s6); - } + #field = #v; + #v.addChild(#s6); + } ) )