Skip to content

Commit

Permalink
Fixing Optional code to work with JDK8
Browse files Browse the repository at this point in the history
  • Loading branch information
abpai94 committed Sep 13, 2024
1 parent a70130d commit 29338eb
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 @@ -92,8 +92,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 29338eb

Please sign in to comment.