You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2019/03/02 09:18:16 UTC

svn commit: r1854629 - /poi/trunk/build.xml

Author: centic
Date: Sat Mar  2 09:18:15 2019
New Revision: 1854629

URL: http://svn.apache.org/viewvc?rev=1854629&view=rev
Log:
Fix detecting Java <= 8 vs. >= 9 to not detect Java 8 for version-string "11.x"
Add system property to junit to disable optimization in jaxb which causes illegal access in Java 9+
Add argument to junit to display all illegal accesses in Java 9+

Modified:
    poi/trunk/build.xml

Modified: poi/trunk/build.xml
URL: http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1854629&r1=1854628&r2=1854629&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Sat Mar  2 09:18:15 2019
@@ -66,12 +66,12 @@ under the License.
 
     <!-- add addOpens parameter for Java 9 and higher -->
     <condition property="addOpens">
-        <not><matches pattern="1\..*" string="${java.version}"/></not>
+        <not><matches pattern="^1\..*" string="${java.version}"/></not>
     </condition>
 
     <!-- add addOpens parameter for Java 10 -->
     <condition property="addOpens10">
-        <matches pattern="10\..*" string="${java.version}"/>
+        <matches pattern="^10\..*" string="${java.version}"/>
     </condition>
 
 
@@ -1242,11 +1242,14 @@ under the License.
                     <jvmarg value="-Xmx@{heap}M"/>
                     <jvmarg value="-ea"/>
 
-                    <!-- some "add-opens" and other properties are needed when running with Java 9 or newer -->
+                    <!-- some "add-opens" are needed for Java 10, but not for 11+ -->
                     <jvmarg value="--add-modules=java.xml.bind" if:true="${addOpens10}" />
                     <jvmarg value="--add-opens=java.base/java.lang=java.xml.bind" if:true="${addOpens10}" />
 
-                    <jvmarg value="-Dsun.reflect.debugModuleAccessChecks=true" if:true="${addOpens}" />
+                    <!-- some "add-opens" and other properties are needed when running with Java 9 or newer -->
+                    <sysproperty key="sun.reflect.debugModuleAccessChecks" value="true" if:true="${addOpens}" />
+                    <sysproperty key="com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize" value="true" if:true="${addOpens}" />
+                    <jvmarg value="--illegal-access=warn" if:true="${addOpens}" />
                     <jvmarg value="--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED" if:true="${addOpens}" />
                     <jvmarg value="--add-opens=java.base/java.io=ALL-UNNAMED" if:true="${addOpens}" />
                     <jvmarg value="--add-opens=java.base/java.nio=ALL-UNNAMED" if:true="${addOpens}" />



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org