Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class SpringNoThisCheck extends AbstractSpringCheck {

private Set<String> names = Collections.emptySet();

private boolean allowAssignement = true;
private boolean allowAssignment = true;

@Override
public int[] getAcceptableTokens() {
Expand All @@ -53,7 +53,7 @@ private void visitIdent(DetailAST ast) {
DetailAST sibling = ast.getPreviousSibling();
if (sibling != null && sibling.getType() == TokenTypes.LITERAL_THIS) {
DetailAST parent = getFirstNonDotParent(ast);
if (!(this.allowAssignement && parent != null && parent.getType() == TokenTypes.ASSIGN)) {
if (!(this.allowAssignment && parent != null && parent.getType() == TokenTypes.ASSIGN)) {
log(ast.getLineNo(), ast.getColumnNo(), "nothis.unexpected", name);
}
}
Expand All @@ -72,8 +72,8 @@ public void setNames(String... names) {
this.names = new HashSet<>(Arrays.asList(names));
}

public void setAllowAssignement(boolean allowAssignement) {
this.allowAssignement = allowAssignement;
public void setAllowAssignment(boolean allowAssignment) {
this.allowAssignment = allowAssignment;
}

}