Skip to content

Commit 865f2d7

Browse files
bithazardjknack
authored andcommitted
Added dependency for the Nashorn JS engine which was removed in Java 15
1 parent 7861a39 commit 865f2d7

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

handlebars/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@
173173
<optional>true</optional>
174174
</dependency>
175175

176+
<!-- Nashorn JS engine -->
177+
<dependency>
178+
<groupId>org.openjdk.nashorn</groupId>
179+
<artifactId>nashorn-core</artifactId>
180+
<version>15.3</version>
181+
</dependency>
182+
176183
<!-- Logging System -->
177184
<dependency>
178185
<groupId>org.slf4j</groupId>

handlebars/src/main/java/com/github/jknack/handlebars/Handlebars.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ private ScriptEngine engine() {
14741474
synchronized (this) {
14751475
if (this.engine == null) {
14761476

1477-
this.engine = new ScriptEngineManager(null).getEngineByName("nashorn");
1477+
this.engine = new ScriptEngineManager().getEngineByName("nashorn");
14781478

14791479
Throwing.run(() -> engine.eval(Files.read(this.handlebarsJsFile, charset)));
14801480
}

0 commit comments

Comments
 (0)