Greetings and welcome to the latest OpenJDK Quality Outreach update!
JDK 24 was officially released (General Availability) on March 18th during
JavaOne. You can rewatch the Java 24 launch and the J1 keynote here [1]. Be
sure to also check out the Quality Outreach section here [2]. JavaOne was
amazing, and if you couldn't attend, make sure to watch the JavaOne 2025
playlist [3] regularly as sessions are gradually being added.
With the release of JDK 24, the focus now moves to JDK 25 testing. On that
note, be sure to check out the heads-up below, with more to follow. And as
always, if you experience any issues with your project running on a JDK 25
early-access builds, please don't hesitate to reach out.
[1] https://www.youtube.com/watch?v=mk_2MIWxLI0&t=12s
[2] https://www.youtube.com/live/GwR7Gvi80Xo?si=gxdqAhVbnNV0JZGt&t=2795
[3] https://www.youtube.com/playlist?list=PLX8CzqL3ArzVV1xRJkRbcM2tOgVwytJAi
# Heads-up - JDK 25: New Null Checks in Inner Class Constructors
The Java Language Specification prescribes that various use sites of inner
class constructors should include null checks of the immediately enclosing
instance and from then on assumes that the reference is non-null. However, it
does not mandate such checks of the incoming instance at the declaration site
of these constructors and so core reflection, method handles, and direct
bytecode invocation can pass null as enclosing instance, which can lead to
NullPointerExceptions down the road.
Since a null enclosing instance is outside of the JLS and the future evolution
of inner classes may lead to unexpected NPEs, Java 25 will start ensuring that
references to the immediately enclosing instance are always non-null.
Starting with JDK 25, when javac is targeting release 25 or higher, it will
emit null checks for the enclosing instances in inner class constructors.
This behavioral change will lead to new NPEs in code that uses core reflection,
method handles, or direct bytecode invocation to pass null as enclosing
instance. Such code is rare and usually found in libraries or frameworks (as
opposed to in applications). It should be changed to no longer pass a null
reference.
In case these additional checks lead to issues, their emission can be prevented
with a flag: `-XDnullCheckOuterThis=(true|false)`. This should be seen as a
temporary workaround and no guarantees are made for how long this flag will be
available.
For more details, check JDK-8351274 [4].
[4] https://bugs.openjdk.org/browse/JDK-8351274
# JDK 25
The JDK 25 early-access builds 17 are available [5] and are provided under the
GNU General Public License v2, with the Classpath Exception. The Release Notes
are available here [6].
The following JEPs have been targeted to JDK 25, so far:
- JEP 502: Stable Values (Preview)
- JEP 503: Remove the 32-bit x86 Port
## Changes in recent JDK 25 builds that may be of interest:
- JDK-8353118: Deprecate the use of `java.locale.useOldISOCodes` system property
- JDK-8351435: Change the default Console implementation back to the built-in
one in `java.base` module
- JDK-8350459: MontgomeryIntegerPolynomialP256 multiply intrinsic with AVX2 on
x86_64
- JDK-8349583: Add mechanism to disable signature schemes based on their TLS
scope
- JDK-8338675: javac shouldn't silently change .jar files on the classpath
- JDK-8319447: Improve performance of delayed task handling
- JDK-8341775: Duplicate manifest files are removed by jarsigner after signing
- JDK-8303770: Remove Baltimore root certificate expiring in May 2025
- JDK-8346948: Update CLDR to Version 47.0
- JDK-8348829: Remove ObjectMonitor perf counters
- JDK-8164714: Constructor.newInstance creates instance of inner class with
null outer class
- JDK-8352716: (tz) Update Timezone Data to 2025b
- JDK-8347946: Add API note that caller should validate/trust signers to the
getCertificates and getCodeSigners methods of JarEntry and JarURLConnection
- JDK-8345213: JVM Prefers /etc/timezone Over /etc/localtime on Debian 12
- JDK-8350646: Calendar.Builder.build() Throws ArrayIndexOutOfBoundsException
- JDK-8347433: Deprecate XML interchange in
java.management/javax/management/modelmbean/DescriptorSupport for removal
- JDK-8328119: Support HKDF in SunPKCS11 (Preview)
- JDK-8327378: XMLStreamReader throws EOFException instead of XMLStreamException
- JDK-8024695: new File("").exists() returns false whereas it is the current
working directory
- JDK-8351224: Deprecate com.sun.tools.attach.AttachPermission for removal
- JDK-8351310: Deprecate com.sun.jdi.JDIPermission for removal
- JDK-8348561: Add aarch64 intrinsics for ML-DSA
- JDK-8351266: JFR: -XX:StartFlightRecording:report-on-exit
- JDK-8350638: Make keyboard navigation more usable in API docs
- JDK-8350464: The flags to set the native priority for the VMThread and Java
threads need a broader range
- JDK-8349860: Make Class.isArray(), Class.isInterface() and
Class.isPrimitive() non-native
- JDK-8347335: ZGC: Use limitless m