diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java index 46b26ef62..1fa51f2d8 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java @@ -264,11 +264,11 @@ public class AnnotationLocationCheck extends Check { * @return Some javadoc. */ private static String getAnnotationName(DetailAST annotation) { - DetailAST idenNode = annotation.findFirstToken(TokenTypes.IDENT); - if (idenNode == null) { - idenNode = annotation.findFirstToken(TokenTypes.DOT).findFirstToken(TokenTypes.IDENT); + DetailAST identNode = annotation.findFirstToken(TokenTypes.IDENT); + if (identNode == null) { + identNode = annotation.findFirstToken(TokenTypes.DOT).findFirstToken(TokenTypes.IDENT); } - return idenNode.getText(); + return identNode.getText(); } /** diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java index 4087b1333..ebd17564c 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java @@ -50,7 +50,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; *
* Using the COMPACT style is less verbose. This style can only * be used when there is an element called 'value' which is either - * the sole element or all other elements have default valuess. + * the sole element or all other elements have default values. * * *
@@ -83,7 +83,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; * *
* By default the ElementStyle is set to EXPANDED, the TrailingArrayComma - * is set to NEVER, and the ClosingParans is set to ALWAYS. + * is set to NEVER, and the ClosingParens is set to ALWAYS. * * *
@@ -208,14 +208,14 @@ public final class AnnotationUseStyleCheck extends Check {
/**
* Retrieves an {@link Enum Enum} type from a @{link String String}.
* @param
* Checks that there is no whitespace before a token.
* More specifically, it checks that it is not preceded with whitespace,
- * or (if linebreaks are allowed) all characters on the line before are
- * whitespace. To allow linebreaks before a token, set property
+ * or (if line breaks are allowed) all characters on the line before are
+ * whitespace. To allow line breaks before a token, set property
* allowLineBreaks to true.
* By default the check will check the following operators:
@@ -47,7 +47,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
* An example of how to configure the check to allow linebreaks before
+ * An example of how to configure the check to allow line breaks before
* a {@link TokenTypes#DOT DOT} token is:
*
* <module name="NoWhitespaceBefore"/>
*
- *
@@ -128,7 +128,7 @@ public class NoWhitespaceBeforeCheck
/**
* Control whether whitespace is flagged at linebreaks.
* @param allowLineBreaks whether whitespace should be
- * flagged at linebreaks.
+ * flagged at line breaks.
*/
public void setAllowLineBreaks(boolean allowLineBreaks) {
this.allowLineBreaks = allowLineBreaks;
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleTest.java
index e8fcc7b4c..1b683d076 100644
--- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleTest.java
@@ -77,7 +77,7 @@ public class AnnotationUseStyleTest extends BaseCheckTestSupport {
* Test that annotation parens are always present.
*/
@Test
- public void testParansAlways() throws Exception {
+ public void testParensAlways() throws Exception {
DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
checkConfig.addAttribute("closingParens", "ALWAYS");
checkConfig.addAttribute("elementStyle", "ignore");
@@ -95,7 +95,7 @@ public class AnnotationUseStyleTest extends BaseCheckTestSupport {
* Test that annotation parens are never present.
*/
@Test
- public void testParansNever() throws Exception {
+ public void testParensNever() throws Exception {
DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
checkConfig.addAttribute("closingParens", "NEVER");
checkConfig.addAttribute("elementStyle", "ignore");
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedTest.java
index 42a951602..57f1caf45 100644
--- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedTest.java
@@ -53,7 +53,7 @@ public class MissingDeprecatedTest extends BaseCheckTestSupport {
}
/**
- * Tests that memebers that are only deprecated via javadoc are flagged.
+ * Tests that members that are only deprecated via javadoc are flagged.
*/
@Test
public void testBadDeprecatedAnnotation() throws Exception {
@@ -75,7 +75,7 @@ public class MissingDeprecatedTest extends BaseCheckTestSupport {
}
/**
- * Tests that memebers that are only deprecated via the annotation are flagged.
+ * Tests that members that are only deprecated via the annotation are flagged.
*/
@Test
public void testBadDeprecatedJavadoc() throws Exception {
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java
index ea02659af..d26e4419a 100644
--- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java
@@ -230,7 +230,7 @@ public class MissingOverrideCheckTest extends BaseCheckTestSupport {
}
@Test
- public void testGetAcceptableTockens() throws Exception {
+ public void testGetAcceptableTokens() throws Exception {
int[] expectedTokens = {TokenTypes.METHOD_DEF };
MissingOverrideCheck check = new MissingOverrideCheck();
int[] actual = check.getAcceptableTokens();
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationTest.java
index cc4613992..69e427274 100644
--- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationTest.java
@@ -51,7 +51,7 @@ public class PackageAnnotationTest extends BaseCheckTestSupport {
}
@Test
- public void testAnnotationnotInPackageInfo() throws Exception {
+ public void testAnnotationNotInPackageInfo() throws Exception {
DefaultConfiguration checkConfig = createCheckConfig(PackageAnnotationCheck.class);
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;