Skip to content

Commit

Permalink
Fixed codacy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mondokm committed Feb 22, 2021
1 parent 98b2096 commit de877a0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public String stateToString(ExplState state) {
var optSymbol = type.getLiterals().stream()
.filter(symbol -> symbol.getIntValue().equals(intValue))
.findFirst();
if(!optSymbol.isPresent()) throw new RuntimeException(String.format("Unknown literal value %s for type %s",intValue,type.getName()));
assert optSymbol.isPresent();
sb.add(String.format("(%s %s)", decl.getName(), optSymbol.get().getName()));
} else {
sb.add(String.format("(%s %s)", decl.getName(), val.get()));
Expand Down

0 comments on commit de877a0

Please sign in to comment.