Skip to content

Commit

Permalink
#304: Using java 8 compatible Optional code
Browse files Browse the repository at this point in the history
  • Loading branch information
abpai94 committed Sep 5, 2024
1 parent 895059b commit 9ce0c33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/lsc/utils/ScriptingEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ else if ("graal.js".equals(name)) {
defaultImplementation = Optional.of(graaljsevaluator);
}
else {
defaultImplementation = Optional.ofNullable(instancesTypeCache.get("js"))
.or(() -> Optional.ofNullable(instancesTypeCache.get("rjs")));
defaultImplementation = Optional.ofNullable(Optional.ofNullable(instancesTypeCache.get("js"))
.orElse(instancesTypeCache.get("rjs")));
}
}

Expand Down

0 comments on commit 9ce0c33

Please sign in to comment.