[ 
https://issues.apache.org/jira/browse/DERBY-7133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556559#comment-17556559
 ] 

Richard N. Hillegas commented on DERBY-7133:
--------------------------------------------

The latest build of Open JDK 19 (19-ea+27-2074) raises new deprecation warnings 
due to the following work:

o The deprecation of constructors for java.util.Locale. They have been replaced 
by new Locale.of(...) methods. See https://bugs.openjdk.org/browse/JDK-8284312

o The deprecation of java.lang.Thread.getId(). It has been replaced by a new 
Thread.threadId() method. See https://bugs.openjdk.org/browse/JDK-8017617

As a consequence, Derby cannot build cleanly on both JDK 17 and JDK 19 now. We 
can approach this problem in the following ways:

1) Add annotations which suppress the new warnings. This will result in code 
which compiles cleanly on both JDK 17 and JDK 19.

2) Or replace the deprecated method calls with calls to the replacement 
methods. This means that the next feature release of Derby will have to be 
targeted at the next LTS java release, i.e., JDK 21 (currently scheduled for GA 
in September, 2023). See 
https://www.oracle.com/java/technologies/java-se-support-roadmap.html

Solution (1) is the more flexible approach. It gives us the ability to produce 
another feature release targeted at JDK 17. Note that no one has requested such 
a release or proposed driving features for it.

Solution (2) would head-off the situation we found ourselves in with 10.16.1.1: 
We invested a fair amount of effort in suppressing deprecation warnings, only 
to be backed into a corner by some late backward incompatibilities which forced 
us to upgrade to JDK 17 and throw away a lot of work.

I lean toward solution (2). Nothing prevents us from issuing another Derby 
release targeted at JDK 17; but it would have to be a bugfix release in the 
10.16 family.

What are your thoughts?


> Make it possible to build and test Derby cleanly with OpenJDK 19
> ----------------------------------------------------------------
>
>                 Key: DERBY-7133
>                 URL: https://issues.apache.org/jira/browse/DERBY-7133
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.16.1.1
>            Reporter: Richard N. Hillegas
>            Priority: Major
>
> Builds of JDK 19 can be found at https://jdk.java.net/19/ We should adjust 
> Derby as necessary so that it builds cleanly (including javadoc) and tests 
> cleanly with this version of the platform.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to