diff options
author | Dominik Stadler <centic@apache.org> | 2019-03-02 09:18:15 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2019-03-02 09:18:15 +0000 |
commit | 421fffbd3f129b1bf33f56a8b2c76236e4293814 (patch) | |
tree | 51af059287cdec6edec7881921df7c7c39b95e07 | |
parent | 00a274c656efbb5ac2fbdf038c489e2617dfb5b9 (diff) | |
download | poi-421fffbd3f129b1bf33f56a8b2c76236e4293814.tar.gz poi-421fffbd3f129b1bf33f56a8b2c76236e4293814.zip |
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+
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1854629 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | build.xml | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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}" /> |