Skip to content

Commit

Permalink
minimal changes to move to java 11 and latest graal #2083 #2148
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed Nov 3, 2022
1 parent 94cd36d commit 87c06dc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@v3
- name: set up jdk 8
- name: set up jdk 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 8
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand Down
2 changes: 1 addition & 1 deletion karate-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<properties>
<antlr.version>4.9.3</antlr.version>
<graal.version>22.0.0.2</graal.version>
<graal.version>22.3.0</graal.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class JsEngine {
private static final Logger logger = LoggerFactory.getLogger(JsEngine.class);

private static final String JS = "js";
private static final String JS_EXPERIMENTAL_FOP = "js.experimental-foreign-object-prototype";
private static final String JS_FOREIGN_OBJECT_PROTOTYPE = "js.foreign-object-prototype";
private static final String JS_NASHORN_COMPAT = "js.nashorn-compat";
private static final String JS_ECMASCRIPT_VERSION = "js.ecmascript-version";
private static final String ENGINE_WARN_INTERPRETER_ONLY = "engine.WarnInterpreterOnly";
Expand All @@ -75,7 +75,7 @@ private static Context createContext(Engine engine) {
.allowAllAccess(true)
.option(JS_NASHORN_COMPAT, TRUE)
.option(JS_ECMASCRIPT_VERSION, V_2021)
.option(JS_EXPERIMENTAL_FOP, TRUE)
.option(JS_FOREIGN_OBJECT_PROTOTYPE, TRUE)
.engine(engine).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void testJavaStaticMethod() {
void testJsNestedArraysToJava() {
je.eval("var StaticPojo = Java.type('com.intuit.karate.graal.StaticPojo')");
JsValue sp = je.eval("StaticPojo.convert({foo:[{a:1}]})");
assertEquals("{\"foo\":{}}", sp.getAsString()); // bug fixed in graal 22.1
assertEquals("{\"foo\":[{\"a\":1}]}", sp.getAsString()); // bug fixed in graal 22.1
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<java.version>11</java.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<maven.surefire.version>2.22.2</maven.surefire.version>
<maven.shade.version>3.2.4</maven.shade.version>
Expand Down

0 comments on commit 87c06dc

Please sign in to comment.