Java 22 is GA + Heads-up!
by David Delabassee
Welcome to the latest OpenJDK Quality Outreach update!
Java 22 was just released along with JavaFX 22 [1][2]. Thank you to all the projects who contributed to those releases by testing and providing feedback using their respective early-access builds. And to celebrate that, the Java DevRel Team hosted a +4h live-stream with guests such as Brian Goetz, Viktor Klang, Alan Bateman, etc. You can watch the launch stream replay here [3].
The JDK 23 schedule is now known [4] with rampdown starting early June and general availability sets for mid-September. So far, 2 JEPs have been targeted to JDK 23:
- JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [5]
- JEP 466: Class-File API (2nd Preview) [6]
The focus should now be shifted to testing your project(s) on JDK 23. And don't forget that the Oracle setup-java github action [7] supports, amongst others, the latest OpenJDK 23 Early-Access builds. So, JDK 23 EA testing is literally one pipeline away.
[1] https://mail.openjdk.org/pipermail/jdk-dev/2024-March/008827.html
[3] https://jdk.java.net/javafx22/
[3] https://www.youtube.com/live/AjjAZsnRXtE?feature=shared&t=278
[4] https://openjdk.org/projects/jdk/23/
[5] https://openjdk.org/jeps/455
[6] https://openjdk.org/jeps/466
[7] https://github.com/oracle-actions/setup-java
## Heads-up: JDK 20-23: Support for Unicode CLDR Version 42
The JDK update to CLDR version 42 included a change where regular spaces in date/time formats (and some other formatted values) were replaced with (narrow) non-breaking spaces. This lead to issues for existing code that relied on parsing such strings. To address that, JDK 23 allows loose matching of spaces when parsing date/time strings. Loose matching is performed in the lenient parsing style for both date/time parsers in `java.time.format` and `java.text` packages. In the default strict parsing style, those spaces are considered distinct as before.
Please read this updated heads-up [9] for details on how to configure strict/lenient parsing in the `java.time.format` (strict by default) and `java.text` (lenient by default) packages.
[9] https://inside.java/2024/03/29/quality-heads-up/
## Heads-up: macOS 14 users running on Apple silicon systems should update directly to macOS 14.4.1
An issue introduced by macOS 14.4 caused some Java processes, regardless of the Java version, to terminate unexpectedly on Apple silicon (AArch64). On March 25 Apple released macOS 14.4.1 and indicated on their support site that it addresses this issue. Oracle can confirm that after applying macOS 14.4.1 we are unable to reproduce the problem. So, Java users on macOS 14 running on Apple silicon systems should skip macOS 14.4 and update directly to macOS 14.4.1.
More details can be found on https://blogs.oracle.com/java/post/java-on-macos-14-4
## JDK 23 Early-Access Builds
The JDK 23 EA builds 16 are available [10], and are provided under the GNU General Public License v2, with the Classpath Exception. The Release Notes [11] are also available.
### Changes in recent JDK 23 builds that may be of interest:
- JDK-8324774: Add DejaVu web fonts (reported by AssertJ)
- JDK-8327385: Add JavaDoc option to exclude web fonts from generated documentation (reported by AssertJ)
- JDK-8328638: Fallback option for POST-only OCSP requests
- JDK-8320362: Load anchor certificates from Keychain keystore
- JDK-8327875: ChoiceFormat should advise throwing UnsupportedOperationException for unused methods
- JDK-8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs
- JDK-8327818: Implement Kerberos debug with sun.security.util.Debug
- JDK-7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream
- JDK-8319251: Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT
- JDK-8327651: Rename DictionaryEntry members related to protection domain
- JDK-8321408: Add Certainly roots R1 and E1
- JDK-8164094: javadoc allows to create a @link to a non-existent method
- JDK-8325496: Make TrimNativeHeapInterval a product switch
- JDK-8174269: Remove COMPAT locale data provider from JDK
- JDK-8322750: Test "api/java_awt/interactive/SystemTrayTests.html" failed because …
- JDK-8139457: Relax alignment of array elements
- JDK-8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly
- JDK-8326908: DecimalFormat::toPattern throws OutOfMemoryError when pattern is empty string
- JDK-8247972: incorrect implementation of JVM TI GetObjectMonitorUsage
- JDK-8325580: Remove "alternatives --remove" call from Java rpm installer
- JDK-8326838: JFR: Native mirror events
- JDK-8326106: Write and clear stack trace table outside of safepoint
- JDK-8323183: ClassFile API performance improvements
- JDK-8324829: Uniform use of synchronizations in NMT
- JDK-8326586: Improve Speed of System.map
- JDK-8318761: MessageFormat pattern support for CompactNumberFormat, ListFormat, and DateTimeFormatter
- JDK-8265372: Simplify PKCS9Attribute
- JDK-8317431: Implement simpler Comparator when building certification paths
- JDK-8327093: Add truncate function to BitMap API
Note: A more detailed list of changes can be found here [12].
[10] https://jdk.java.net/23/
[11] https://jdk.java.net/23/release-notes
[12] https://github.com/openjdk/jdk/compare/jdk-23+10...jdk-23+16
## JavaFX 23 Early-Access Builds
These are early access builds of the JavaFX 23 Runtime built from openjdk/jfx [13]. These builds enable JavaFX application developers to build and test their applications with JavaFX 23 on JDK 23. Although these builds are designed to work with JDK 23, they are also known to work with JDK 17 and later versions.
The latest early access builds of JavaFX 23 Builds 10 (2024/3/26) are available [14], under the GNU General Public License, version 2, with the Classpath Exception.
[13] https://github.com/openjdk/jfx
[14] https://jdk.java.net/javafx23/
## Topics of Interest:
- The Arrival of Java 22
https://inside.java/2024/03/19/the-arrival-of-java-22/
- JDK 22 Release Notes Review (video)
https://inside.java/2024/03/14/newscast-65/
- Java 22 in 2 Minutes
https://inside.java/2024/03/21/sip095/
- (Dirty?) Tricks in Java 22
https://inside.java/2024/02/29/newscast-64/
- JDK 22 Security Enhancements
https://seanjmullan.org/blog/2024/03/20/jdk22
- Java 17 to 21 - A Showcase of JDK Security Enhancements
https://inside.java/2024/03/03/jfokus-jdk-security-changes/
- Netflix - Bending Pause Times to Your Will with Generational ZGC
https://netflixtechblog.com/bending-pause-times-to-your-will-with-generat...
- MethodHandle Primer
https://jornvernee.github.io/methodhandles/2024/01/19/methodhandle-primer...
- Pruning Dead Exception Handlers
https://jornvernee.github.io/hotspot/jit/2024/02/16/prune-dead-exception-...
- Update on String Templates (JEP 459)
https://mail.openjdk.org/pipermail/amber-spec-experts/2024-March/004010.html
- The State of OpenJDK
https://inside.java/2024/02/23/fosdem2024-openjdk-state/
- Project Wakefield - The JDK Wayland Desktop on Linux
https://inside.java/2024/03/24/openjdk-wakefield/
- Project Leyden - Capturing Lightning in a Bottle
https://inside.java/2024/02/28/leyden/
- jlink - Java's Custom Runtime Builder
https://inside.java/2024/02/25/jlink-stackwalker/
- Modern Java in Action
https://inside.java/2024/03/09/jfokus-modern-java-action/
- New Java Platform Extension for VS Code Release
https://inside.java/2024/03/27/vscode-extension-update/
~
That's it for this instalment. And don't forget to ping me if you encounter issues with JDK 23 EA builds.
--David
8 months