Skip to content

Commit

Permalink
* Fix host objects not getting persisted
Browse files Browse the repository at this point in the history
* Add GraaVM Regex and ICU4J dependencies
  • Loading branch information
shanggeeth committed Feb 8, 2024
1 parent a5d872a commit 6305222
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-api</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.regex</groupId>
<artifactId>regex</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
</dependency>

<dependency>
<groupId>org.testng</groupId>
Expand Down Expand Up @@ -271,6 +279,8 @@
org.osgi.service.http; version="${osgi.service.http.imp.pkg.version.range}",
org.osgi.util.tracker; version="${osgi.util.tracker.imp.pkg.version.range}",

org.graalvm.polyglot.*; version="${graalvm.version.range}",

org.wso2.carbon.user.api; version="${carbon.user.api.imp.pkg.version.range}",

org.wso2.carbon.registry.core.*; version="${carbon.kernel.registry.imp.pkg.version}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static void persistCurrentContext(AuthenticationContext authContext, Cont
Map<String, Object> persistableMap = new HashMap<>();
engineBindings.getMemberKeys().forEach((key) -> {
Value binding = engineBindings.getMember(key);
if (!binding.isHostObject()) {
if (!(binding.isHostObject() && (binding.canExecute() || !binding.hasArrayElements()))) {
persistableMap.put(key, GraalSerializer.getInstance().toJsSerializable(binding));
}
});
Expand Down
23 changes: 13 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1808,16 +1808,16 @@
<artifactId>truffle-api</artifactId>
<version>${graalvm.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.ibm.icu</groupId>-->
<!-- <artifactId>icu4j</artifactId>-->
<!-- <version>${icu.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.graalvm.regex</groupId>-->
<!-- <artifactId>regex</artifactId>-->
<!-- <version>${graalvm.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.graalvm.regex</groupId>
<artifactId>regex</artifactId>
<version>${graalvm.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>${icu.version}</version>
</dependency>
</dependencies>

</dependencyManagement>
Expand Down Expand Up @@ -2000,6 +2000,8 @@
<commons-collections4.wso2.osgi.version.range>[4.1.0,5.0.0)</commons-collections4.wso2.osgi.version.range>
<import.package.version.commons.logging>[1.2.0,2.0.0)</import.package.version.commons.logging>

<!-- Neethi -->

<neethi.osgi.version>2.0.4.wso2v5</neethi.osgi.version>
<neethi.osgi.version.range>[2.0.4.wso2v4,3.0.0)</neethi.osgi.version.range>
<libthrift.wso2.version>0.16.0.wso2v1</libthrift.wso2.version>
Expand Down Expand Up @@ -2123,6 +2125,7 @@
<h2database.version>2.2.224</h2database.version>

<graalvm.version>22.3.4</graalvm.version>
<graalvm.version.range>[22.3.0,23.0.0)</graalvm.version.range>
<!-- ICU version must be reflecting graalvm version -->
<icu.version>71.1</icu.version>

Expand Down

0 comments on commit 6305222

Please sign in to comment.