[
https://issues.apache.org/jira/browse/DERBY-6998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16705983#comment-16705983
]
Rick Hillegas commented on DERBY-6998:
--------------------------------------
Attaching derby-6998-05-aa-use-java.specification.version.diff. This patch
updates the test machinery so that the old harness tests run on Java 10.
When trying to run the modulepath tests on Linux on Java 10, I discovered that
the old harness tests no longer run on Java 10. The machinery for picking a JVM
wrapper class is very brittle. It works for Java 9 and 11 but not for Java 10.
The machinery tries to figure out the major/minor levels of the JVM in two
separate places in two different ways. In one place the machinery parses these
levels correctly by getting them from the system property
java.specification.version. In the other place it gets the wrong answer for
Java 10 when parsing the major/minor levels from the value of the system
property java.version.
I made both places use java.specification.version.
If this brittle logic continues to plague us in the future, then I recommend
that we rewrite it to be much simpler. This logic evolved over time to handle a
lot of JVMs which we no longer support. That complexity is no longer needed.
I will build and run tests on Java 9, 10, and 11 before checking in this fix.
Touches the following file:
{noformat}
M
java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunTest.java
{noformat}
> Make it possible to build Derby cleanly using JDK 10
> ----------------------------------------------------
>
> Key: DERBY-6998
> URL: https://issues.apache.org/jira/browse/DERBY-6998
> Project: Derby
> Issue Type: Bug
> Components: Build tools
> Affects Versions: 10.15.0.0
> Reporter: Rick Hillegas
> Priority: Major
> Attachments: derby-6998-01-ab-tightenReturnType.diff,
> derby-6998-02-aa-supportForJDK11.diff,
> derby-6998-03-aa-reenableEncryptionTestsOnJDK11.diff,
> derby-6998-04-aa-increaseCertificateLifetime.diff,
> derby-6998-05-aa-use-java.specification.version.diff, sslHandshake.tar
>
>
> When I build Derby using JDK 10, I get the following warning:
> {noformat}
> [javac]
> /Users/rhillegas/derby/mainline/trunk/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:728:
> warning: [unchecked] getPrefixes(String) in NullNamespaceContext implements
> getPrefixes(String) in NamespaceContext
> [javac] public Iterator getPrefixes(String namespaceURI) {
> [javac] ^
> [javac] return type requires unchecked conversion from Iterator to
> Iterator<String>
> [javac] 1 warning
> {noformat}
> I will clean this up.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)