Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/main/java/org/scijava/parsington/Tokens.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static boolean isComma(final Object o) {
}

public static boolean isCharacter(final Object o, final Character c) {
return o instanceof Character && ((Character) o).equals(c);
return o instanceof Character && o.equals(c);
}

public static boolean isMatchingGroup(final Object o, final Group g) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ default Object execute(final Operator op, final SyntaxTree tree) {
// Handle short-circuiting operators first.
if (op == Operators.LOGICAL_AND) {
final Object leftValue = value(evaluate(tree.child(0)));
if (leftValue instanceof Boolean && !((Boolean) leftValue).booleanValue()) {
if (leftValue instanceof Boolean && !(Boolean) leftValue) {
// Left side is false, so entire expression will be false.
return false;
}
Expand All @@ -58,7 +58,7 @@ default Object execute(final Operator op, final SyntaxTree tree) {
}
else if (op == Operators.LOGICAL_OR) {
final Object leftValue = value(evaluate(tree.child(0)));
if (leftValue instanceof Boolean && ((Boolean) leftValue).booleanValue()) {
if (leftValue instanceof Boolean && (Boolean) leftValue) {
// Left side is true, so entire expression will be true.
return true;
}
Expand Down
Loading