Skip to content

Commit 1425c60

Browse files
committed
minor: fix violations detected by checkstyle/checkstyle#7533
1 parent 6dd72c6 commit 1425c60

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/annotation/ForbidAnnotationCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static String getAnnotationName(DetailAST annotation) {
126126
final DetailAST directname = annotation.findFirstToken(TokenTypes.IDENT);
127127

128128
if (directname == null) {
129-
//This means that annotation is specified with the full package name
129+
// This means that annotation is specified with the full package name
130130
result = annotation.findFirstToken(TokenTypes.DOT).getLastChild().getText();
131131
}
132132
else {

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/CustomDeclarationOrderCheck.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public final void setCustomDeclarationOrder(final String inputOrderDeclaration)
296296
.add(parseInputDeclarationRule(currentState));
297297
}
298298
catch (StringIndexOutOfBoundsException exp) {
299-
//if the structure of the input rule isn't correct
299+
// if the structure of the input rule isn't correct
300300
throw new IllegalArgumentException("Unable to parse input rule: "
301301
+ currentState, exp);
302302
}
@@ -813,7 +813,7 @@ private static String getCombinedModifiersList(final DetailAST ast) {
813813
final StringBuilder modifiers = new StringBuilder();
814814
DetailAST astNode = ast.findFirstToken(TokenTypes.MODIFIERS);
815815
if (astNode.getFirstChild() == null) {
816-
//if we met package level modifier
816+
// if we met package level modifier
817817
modifiers.append("package ");
818818
}
819819

@@ -848,7 +848,7 @@ private static String getModifiersAsText(final DetailAST ast) {
848848
while (astNode != null) {
849849
if (astNode.getFirstChild() == null) {
850850
if (astNode.getType() == TokenTypes.RBRACK) {
851-
//if array
851+
// if array
852852
modifiers.append('[');
853853
}
854854
modifiers.append(astNode.getText());

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/MapIterationInForEachLoopCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public void visitToken(DetailAST ast) {
307307
final DetailAST mapIdentNode = ast.findFirstToken(TokenTypes.TYPE)
308308
.getNextSibling();
309309
final String mapName = mapIdentNode.getText();
310-
//If Map name is contains into mMapNamesList, it doesn't need second inclusion
310+
// If Map name is contains into mMapNamesList, it doesn't need second inclusion
311311
if (!mapNamesList.contains(mapName)) {
312312
mapNamesList.add(mapIdentNode.getText());
313313
}

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/NoNullForCollectionReturnCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ private static boolean isReturnedValueBeNull(DetailAST returnLit) {
225225

226226
result = hasNullInDefinition(subblocks, variableName);
227227

228-
//searching for not a null value into variable assignment
228+
// searching for not a null value into variable assignment
229229
if (result) {
230230
for (DetailAST subblock : subblocks) {
231231
final List<DetailAST> expressions =

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/OverridableMethodInConstructorCheck.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ else if (curMethodDefCount == 1) {
525525
sameDefinitionCounter++;
526526
}
527527
}
528-
//you have a lot same method definitions and you can't
529-
//select one of them and be sure that you are right
528+
// you have a lot same method definitions and you can't
529+
// select one of them and be sure that you are right
530530
if (sameDefinitionCounter > 1) {
531531
result = null;
532532
}

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/SimpleAccessorNameNotationCheck.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ && verifyFieldAndMethodName(nameOfGettingField,
216216
* @return true if object block is correct
217217
*/
218218
private static boolean containsOnlyExpression(DetailAST objectBlock) {
219-
//three child: EXPR, SEMI and RCURLY
219+
// three child: EXPR, SEMI and RCURLY
220220
return objectBlock.getChildCount() == EXPRESSION_BLOCK_CHILD_COUNT
221221
&& objectBlock.getFirstChild().getType() == TokenTypes.EXPR;
222222
}
@@ -294,7 +294,7 @@ private static boolean containsOnlyReturn(DetailAST methodBody) {
294294
* @return - true when getter has correct return.
295295
*/
296296
private static boolean isCorrectReturn(DetailAST literalReturn) {
297-
//two child: EXPR and SEMI
297+
// two child: EXPR and SEMI
298298
return literalReturn.getChildCount() == 2
299299
&& literalReturn.getFirstChild().getType() == TokenTypes.EXPR;
300300
}

0 commit comments

Comments
 (0)