Skip to content

Commit 39f4096

Browse files
committed
could cause an npe. changing order.
1 parent 0bc5dcb commit 39f4096

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compiler/src/main/java/com/github/mustachejava/reflect/ClassGuard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ public boolean equals(Object o) {
3333
public boolean apply(Object[] scopes) {
3434
if (scopes == null || scopes.length <= scopeIndex) return false;
3535
Object scope = scopes[scopeIndex];
36-
return (scope != null && classGuard.equals(scope.getClass())) || (scope == null && classGuard == null);
36+
return (scope == null && classGuard == null) || (scope != null && classGuard == scope.getClass());
3737
}
3838
}

0 commit comments

Comments
 (0)