Issue #131 AnnotationUseStyle closingParens check failed

This commit is contained in:
ychulovskyy 2014-12-21 21:35:30 +01:00 committed by Roman Ivanov
parent 49ae6cf81b
commit f0c6c6ad7c
2 changed files with 7 additions and 0 deletions

View File

@ -416,6 +416,8 @@ public final class AnnotationUseStyleCheck extends Check
}
else if (ClosingParens.NEVER.equals(this.mParens)
&& !aAST.branchContains(TokenTypes.EXPR)
&& !aAST.branchContains(TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR)
&& !aAST.branchContains(TokenTypes.ANNOTATION_ARRAY_INIT)
&& parenExists)
{
this.log(aAST.getLineNo(), "annotation.parens.present");

View File

@ -58,3 +58,8 @@ enum E {
@Another({"foo", "bar"}) //compact style
String value1() default "";
}
@SomeArrays(pooches = {})
@Another({})
class Closing {
}