Skip to content

Commit 486e985

Browse files
authored
Merge pull request #11 from fartem/1.2.3
2021-05-07 v. 1.2.3: fixed AndroidViewFieldNameCheck
2 parents 0f96f2a + c37036b commit 486e985

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/smlnskgmail/jaman/checkstyle/checks/AndroidViewFieldNameCheck.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ public void visitToken(DetailAST ast) {
103103
String fieldClassName = identifier.getText();
104104
if (VIEW_NAMES.containsKey(fieldClassName)) {
105105
String ident = ast.findFirstToken(TokenTypes.IDENT).getText();
106-
if (!VIEW_NAMES.get(fieldClassName).startsWith(ident)) {
106+
if (VIEW_NAMES.containsKey(fieldClassName)
107+
&& !ident.startsWith(VIEW_NAMES.get(fieldClassName))) {
107108
log(ast);
108109
}
109110
}

0 commit comments

Comments
 (0)