You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2022/05/11 09:37:42 UTC

[tomee-tck] branch jakartaee9-tck updated: JSTL Date parsing fix and Tomcat add-opens when starting with the RemoteServer as opposed to Tomcat catalina.sh

This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git


The following commit(s) were added to refs/heads/jakartaee9-tck by this push:
     new f7d2554  JSTL Date parsing fix and Tomcat add-opens when starting with the RemoteServer as opposed to Tomcat catalina.sh
f7d2554 is described below

commit f7d255414259a0ceb352c7bc19f33c8a00e2dbe0
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Wed May 11 11:37:35 2022 +0200

    JSTL Date parsing fix and Tomcat add-opens when starting with the RemoteServer as opposed to Tomcat catalina.sh
---
 .../script/openejb/tck/commands/JavaTestCommand.groovy   | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
index 7199069..e76e744 100644
--- a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
+++ b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
@@ -238,8 +238,22 @@ class JavaTestCommand
 
                 def containerJavaOpts = get('container.java.opts', "")
 
+                // http://openjdk.java.net/jeps/252
+                // need to set back java locale to COMPAT,SPI for Java 9 and above
+                // tomcat requires add-opens to function properly as well
+                def matches = containerJavaVersion ==~ /1[0-9]/;
+                if (matches || new File(containerJavaHome as String, 'jmods').exists()) {
+                    containerJavaOpts += " -Djava.locale.providers=COMPAT,SPI"
+                    containerJavaOpts += " --add-opens=java.base/java.lang=ALL-UNNAMED"
+                    containerJavaOpts += " --add-opens=java.base/java.io=ALL-UNNAMED"
+                    containerJavaOpts += " --add-opens=java.base/java.util=ALL-UNNAMED"
+                    containerJavaOpts += " --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
+                    containerJavaOpts += " --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
+                }
+
+
                 // not sure about this ....
-                if (tckJavaHome == null || !new File(tckJavaHome, 'jmods').exists()/*j9 doesnt support it*/) {
+                if (tckJavaHome == null || !new File(tckJavaHome as String, 'jmods').exists()/*j9 doesnt support it*/) {
                     sysproperty(key: "java.endorsed.dirs", file: "${javaeeRiHome}/lib/endorsed")
                     sysproperty(key: "command.testExecute.endorsed.dir", value: "-Djava.endorsed.dirs=${javaeeCtsHome}/endorsedlib")
                     sysproperty(key: "command.testExecuteEjbEmbed.endorsed.dir", value: "-Djava.endorsed.dirs=${openejbHome}/endorsed")