Skip to content

Commit

Permalink
[java] Further condense the is allowed check
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Feb 14, 2023
1 parent 415e750 commit 60a65f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public boolean getPredicate() {
* @return true, if is allowed
*/
public boolean isAllowed(final boolean matched) {
return (matched && allowed) || (!matched && !allowed);
return matched == allowed;
}

public static Rule valueOf(final boolean allowed) {
Expand Down

0 comments on commit 60a65f9

Please sign in to comment.