JDK 22 is in Rampdown Phase 2 | Annotation Processing Change Heads-up

David Delabassee david.delabassee at oracle.com
Fri Jul 28 10:11:53 UTC 2023


Welcome to the OpenJDK Quality Outreach summer update.

JDK 21 is now in Rampdown Phase Two [1], its overall feature has been frozen a few weeks ago. Per the JDK Release Process [2] we have now turned our focus to P1 and P2 bugs, which can be fixed with approval [3]. Late enhancements are still possible, with approval, but the bar is now extraordinarily high [4]. That also means that the JDK 21 Initial Release Candidates are fast approaching, i.e., August 10 [5]. So, and in addition to testing your projects with the latest JDK 21 early-access builds, it is now also a good time to start testing with the JDK 22 early-access builds.

[1] https://mail.openjdk.org/pipermail/jdk-dev/2023-July/008034.html
[2] https://openjdk.org/jeps/3
[3] https://openjdk.org/jeps/3#Fix-Request-Process
[4] https://openjdk.org/jeps/3#Late-Enhancement-Request-Process
[5] https://openjdk.org/projects/jdk/21/


## Heads-up - JDK 21 & JDK 22: Note if implicit annotation processing is being used

Annotation processing by javac is enabled by default, including when no annotation processing configuration options are present. We are considering disabling implicit annotation processing by default in a future release, possibly as early as JDK 22 [6]. To alert javac users of this possibility, as of JDK 21 b29 and JDK 22 b04, javac prints a note if implicit annotation processing is being used [7]. The reported note is:

    Annotation processing is enabled because one or more processors were
    found on the class path. A future release of javac may disable
    annotation processing unless at least one processor is specified by
    name (-processor), or a search path is specified (--processor-path,
    --processor-module-path), or annotation processing is enabled
    explicitly (-proc:only, -proc:full).
    Use -Xlint:-options to suppress this message.
    Use -proc:none to disable annotation processing.

Good build hygiene includes explicitly configuring annotation processing. To ease the transition to a different default policy in the future, the new-in-JDK-21 `-proc:full` javac option requests the current default behavior of looking for annotation processors on the class path.

[6] https://bugs.openjdk.org/browse/JDK-8306819
[7] https://bugs.openjdk.org/browse/JDK-8310061


## Heads-up - JDK 22: JLine is now the Default Console Provider

In JDK 22, `System.console()` has been changed [8] to return a `Console` with enhanced editing features that improve the experience of programs that use the `Console` API. In addition, `System.console()` now returns a `Console` object when the standard streams are redirected or connected to a virtual terminal. Prior to JDK 22, `System.console()` instead returned `null` for these cases. This change may impact code that checks the return from `System.console()` to test if the JVM is connected to a terminal. If required, the `-Djdk.console=java.base` flag will restore the old behavior where the console is only returned when it is connected to a terminal. Starting JDK 22, one could also use the new `Console.isTerminal()` method to test if the console is connected to a terminal.

[8] https://bugs.openjdk.org/browse/JDK-8308591


## JDK 21 Early-Access Builds

The JDK 21 early-access builds 33 are available [9], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [10] and the Javadoc here [11].

[9] https://jdk.java.net/21/
[10] https://jdk.java.net/21/release-notes
[11] https://download.java.net/java/early_access/jdk21/docs/api/


## JDK 22 Early-Access Builds

The JDK 22 early-access builds 8 are available [12], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes are available here [13].

[12] https://openjdk.org/projects/jdk/22
[13] https://jdk.java.net/22/release-notes

### Changes in recent JDK 22 builds (b2-b8) that may be of interest:

Note that this is only a curated list of changes, make sure to check [14] for additional changes.

- JDK-8309882: LinkedHashMap adds an errant serializable field [Reported by Eclipse Collections]
- JDK-8312366: [arm32] Build crashes after JDK-8310233 [Reported by JaCoCo]
- JDK-8167252: Some of Charset.availableCharsets() does not contain itself [Reported by IntelliJ]
- JDK-8310061: Note if implicit annotation processing is being used
- JDK-8308591: JLine as the default Console provider
- JDK-8312019: Simplify and modernize java.util.BitSet.equals
- JDK-8308593: Add KEEPALIVE Extended Socket Options Support for Windows
- JDK-8227229: Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6
- JDK-6983726: Reimplement MethodHandleProxies.asInterfaceInstance
- JDK-8281658: Add a security category to the java -XshowSettings option
- JDK-8310201: Reduce verbose locale output in -XshowSettings launcher option
- JDK-8295894: Remove SECOM certificate that is expiring in September 2023
- JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly
- JDK-8282797: CompileCommand parsing errors should exit VM
- JDK-8305104: Remove the old core reflection implementation
- JDK-8310460: Remove jdeps -profile option
- JDK-8309032: jpackage does not work for module projects unless --module-path is specified
- JDK-8291065: Creating a VarHandle for a static field triggers class initialization
- JDK-8312072: Deprecate for removal the -Xnoagent option
- JDK-8304885: Reuse stale data to improve DNS resolver resiliency=
- JDK-8310047: Add UTF-32 based Charsets into StandardCharsets
- JDK-8302483: Enhance ZIP performance
- JDK-8300596: New System Property to Control the Maximum Size of Signature Files
- JDK-8294323: ASLR Support for CDS Archive
- JDK-8311038: Incorrect exhaustivity computation
- JDK-8312089: Simplify and modernize equals, hashCode, and compareTo in java.nio…
- JDK-8311188: Simplify and modernize equals and hashCode in java.text
- JDK-8300285: Enhance TLS data handling
- JDK-8302475: Enhance HTTP client file downloading

[14] https://github.com/openjdk/jdk/compare/jdk-22%2B1...jdk-22%2B8


## JavaFX Early-Access Builds

These are early access builds of the JavaFX 21 Runtime, built from openjdk/jfx [15]. They enable JavaFX application developers to build and test their applications with JavaFX 21 on JDK 21.

The latest JavaFX 21 early-access builds (build 27 - 2023/7/21) are now available [16] with their related Javadoc [17]. Moreover, the initial JavaFX 22 early-access builds [18] are now also available. These early-access builds are provided under the GNU General Public License, version 2, with the Classpath Exception. Please send feedback to the openjfx-dev mailing list [19].

[15] https://github.com/openjdk/jfx
[16] https://jdk.java.net/javafx21/
[17] https://download.java.net/java/early_access/javafx21/docs/api/overview-summary.html
[18] https://jdk.java.net/javafx22/
[19] http://mail.openjdk.org/mailman/listinfo/openjfx-dev


## Topics of Interest:

Foreign Function & Memory API Summer Update
https://mail.openjdk.org/pipermail/panama-dev/2023-July/019510.html

What's Arriving for JFR in JDK 21 - Inside Java Newscast #53
https://inside.java/2023/07/20/java-21-jfr/

Java's Startup Booster: CDS - Stack Walker
https://inside.java/2023/07/11/javas-startup-booster-cds/


## July 2023 Critical Patch Update Released

As part of the July 2023 CPU, Oracle released OpenJDK 20.0.2, JavaFX 20.0.2, JDK 20.0.2, JDK 17.0.8 LTS, JDK 11.0.20 LTS, JDK 8u381, as well as JDK 8u381-perf.

~

We still have a few days before JDK 21 enters into the Release Candidate phase so please make sure to test your projects on the latest early-access builds and report any issue.

PS: Make sure to enjoy the summer and recharge your batteries! 😎

--David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/quality-discuss/attachments/20230728/caafe946/attachment-0001.htm>


More information about the quality-discuss mailing list