This week's Java roundup for May 8th, 2023, features news from OpenJDK, JDK 21, GraalVM Native Build Tools 0.9.22, Spring Framework, Spring Data and Spring Shell releases, Micronaut 4.0-M3, Quarkus 3.0.3, Eclipse Vert.x releases, Micrometer Metrics and Tracing releases, Groovy 4.0.12, Tomcat releases, Maven 3.9.2, Piranha 23.5.0, Reactor 2022.0.7, JobRunr 6.2, JDKMon releases and Devoxx UK.
OpenJDK
JEP 448, Vector API (Sixth Incubator), has been promoted from Proposed to Target to Targeted for JDK 21. This JEP, under the auspices of Project Panama, incorporates enhancements in response to feedback from the previous five rounds of incubation: JEP 438, Vector API (Fifth Incubator), delivered in JDK 20; JEP 426, Vector API (Fourth Incubator), delivered in JDK 19; JEP 417, Vector API (Third Incubator), delivered in JDK 18; JEP 414, Vector API (Second Incubator), delivered in JDK 17; and JEP 338, Vector API (Incubator), delivered as an incubator module in JDK 16. This feature proposes to enhance the Vector API to load and store vectors to and from a MemorySegment
as defined by JEP 424, Foreign Function & Memory API (Preview).
JEP 441, Pattern Matching for switch, has been promoted from Proposed to Target to Targeted for JDK 21. This JEP finalizes this feature and incorporates enhancements in response to feedback from the previous four rounds of preview: JEP 433, Pattern Matching for switch (Fourth Preview), delivered in JDK 20; JEP 427, Pattern Matching for switch (Third Preview), delivered in JDK 19; JEP 420, Pattern Matching for switch (Second Preview), delivered in JDK 18; and JEP 406, Pattern Matching for switch (Preview), delivered in JDK 17. This feature enhances the language with pattern matching for switch expressions and statements. InfoQ will follow up with a more detailed news story.
JEP 440, Record Patterns, has been promoted from Proposed to Target to Targeted for JDK 21. This JEP also finalizes this feature and incorporates enhancements in response to feedback from the previous two rounds of preview: JEP 432, Record Patterns (Second Preview), delivered in JDK 20; and JEP 405, Record Patterns (Preview), delivered in JDK 19. This feature enhances the language with record patterns to deconstruct record values. Record patterns may be used in conjunction with type patterns to "enable a powerful, declarative, and composable form of data navigation and processing." Type patterns were recently extended for use in switch
case labels via: JEP 420, Pattern Matching for switch (Second Preview), delivered in JDK 18, and JEP 406, Pattern Matching for switch (Preview), delivered in JDK 17. The most significant change from JEP 432 removed support for record patterns appearing in the header of an enhanced for
statement. InfoQ will follow up with a more detailed news story.
JEP 439, Generational ZGC, has been promoted from Proposed to Target to Targeted for JDK 21. This JEP proposes to "improve application performance by extending the Z Garbage Collector (ZGC) to maintain separate generations for young and old objects. This will allow ZGC to collect young objects, which tend to die young, more frequently." InfoQ will follow up with a more detailed news story.
JEP 449, Deprecate the Windows 32-bit x86 Port for Removal, has been promoted from Candidate to Proposed to Target for JDK 21. This feature JEP, introduced by George Adams, senior program manager at Microsoft, proposes to deprecate the Windows x86-32 port with the intent to remove it in a future release. With no intent to implement JEP 436, Virtual Threads (Second Preview), in 32-bit platforms, removing support for this port will enable OpenJDK developers to accelerate development of new features. The review is expected to conclude on May 18, 2023.
JEP 443, Unnamed Patterns and Variables (Preview), has been promoted from Candidate to Proposed to Target for JDK 21. This preview JEP proposes to "enhance the language with unnamed patterns, which match a record component without stating the component's name or type, and unnamed variables, which can be initialized but not used." Both of these are denoted by the underscore character as in r instanceof _(int x, int y)
and r instanceof _
. The review is expected to conclude on May 15, 2023.
JEP 453, Structured Concurrency (Preview), has been promoted from its JEP Draft 8306641 to Candidate status. Formerly a incubating API, this initial preview incorporates enhancements in response to feedback from the previous two rounds of incubation: JEP 428, Structured Concurrency (Incubator), delivered in JDK 19; and JEP 437, Structured Concurrency (Second Incubator), delivered in JDK 20. The only significant change features the fork()
method defined in the StructuredTaskScope
class returns an instance of TaskHandle
rather than a Future
since the get()
method in the TaskHandle
interface was restructured to behave the same as the resultNow()
method in the Future
interface.
JEP 452, Key Encapsulation Mechanism API, has been promoted from its JEP Draft 8301034 to Candidate status. This feature JEP type proposes to: satisfy implementations of standard Key Encapsulation Mechanism (KEM) algorithms; satisfy use cases of KEM by higher level security protocols; and allow service providers to plug-in Java or native implementations of KEM algorithms. This draft was recently updated to include a major change that eliminates the DerivedKeyParameterSpec
class in favor of placing fields in the argument list of the encapsulate(int from, int to, String algorithm)
method.
JEP 451, Prepare to Disallow the Dynamic Loading of Agents, has been promoted from its JEP Draft 8306275 to Candidate status. Originally known as Disallow the Dynamic Loading of Agents by Default, and following the approach of JEP Draft 8305968, Integrity and Strong Encapsulation, this JEP has evolved from its original intent to disallow the dynamic loading of agents into a running JVM by default to issue warnings when agents are dynamically loaded into a running JVM. Goals of this JEP include: reassess the balance between serviceability and integrity; and ensure that a majority of tools, which do not need to dynamically load agents, are unaffected.
The joint draft specification for JEP 440, Record Patterns, and JEP 441, Pattern matching for switch, has been updated by Gavin Bierman, consulting member of technical staff at Oracle, for review by the Java community. Significant changes include: an update of the specification of type inference for record patterns; and removal of the non-denotable "any"' patterns and the process of resolving patterns in favor of a compile-time notion of a type pattern being "null-matching" or not.
John Rose, JVM architect at Oracle, has published a whitepaper that outlines his concerns on how Project Lilliput, with a goal to reduce the object header to 64 bits, could affect development in Project Valhalla.
JDK 21
Build 22 of the JDK 21 early-access builds was also made available this past week featuring updates from Build 21 that include fixes to various issues. Further details on this build may be found in the release notes.
For JDK 21, developers are encouraged to report bugs via the Java Bug Database.
GraalVM Native Build Tools
On the road to version 1.0, Oracle Labs has released version 0.9.22 of Native Build Tools, a GraalVM project consisting of plugins for interoperability with GraalVM Native Image. This latest release provides notable changes such as: a fix for the URL lookup of the GraalVM Reachability Metadata Repository; add support for the default-for
attribute; and a dependency upgrade to Metadata 0.3.0. More details on this release may be found in the changelog.
Fabio Niephaus, principal researcher on the GraalVM team at Oracle Labs, has announced improvements to GraalVM memory usage in native image builds. In particular: it only uses available memory, uses less overall memory, and faster builds of large applications after raising the memory limit to 32GB.
Spring Framework
The release of Spring Framework 6.0.9 delivers bug fixes, improvements in documentation, dependency upgrades and new features such as: consistent support for the MultiValueMap
interface and common Map
implementations in the CollectionFactory
class; introduce internal constants for implicit bounds in the TypeUtils
class; and a new matchesProfiles()
method in the Environment
interface for profile expressions. More details on this release may be found in the release notes.
Spring Data 2023.0.0, codenamed Ullman, has been released featuring: new keyset-based scrolling for Spring Data MongoDB, Spring Data Neo4j and Spring Data JPA; improved support for AOT processing with Querydsl and Kotlin; and upgrades to the Spring Data sub-projects. More details on this release may be found in the release notes.
Versions 2022.0.6 and 2021.2.12, both service releases of Spring Data, ship with bug fixes and dependency upgrades to sub-projects such as: Spring Data Commons 3.0.6 and 2.7.12; Spring Data MongoDB 4.0.6 and 3.4.12; Spring Data Elasticsearch 5.0.6 and 4.4.12; and Spring Data Neo4j 7.0.6 and 6.3.12.
Versions 3.1.0-RC1, 3.0.3 and 2.1.9 of Spring Shell have been released featuring: a migration of documentation to Asciidoctor Spring Backends; a dependency upgrade to JLine 3.23.0; and a backport of bug fixes. These versions build upon Spring Boot versions 3.1.0-RC2, 3.0.6 and 2.7.11, respectively. More details on these releases may be found in the release notes for version 3.1.0-RC1, version 3.0.3 and version 2.1.9.
Micronaut
The Micronaut Foundation has provided the second and third milestone releases of Micronaut Framework 4.0.0 featuring bug fixes, improvements and new features such as: new interfaces, MessageBodyWriter
and MessageBodyReader
, that can be used on both the client and the server as a single place to add custom writing and reading responses; support for annotation-based CORS configuration; additional configuration to endpoints for the service-http-client.enabled
property with a default set to false
; and support for compilation-time checked expressions in Micronaut annotations. More details on these releases may be found in the release notes for version 4.0.0-M2 and version 4.0.0-M3.
Quarkus
Quarkus 3.0.3.Final, the third maintenance release, delivers notable changes such as: a fix for an exception thrown due to null parameter in the SimpleResourceInfo
interface in a response filter; improved container runtime detection; a workaround for unnecessary information logs in Hibernate ORM; and a resolution for unexpected behavior in reactive native mode with Quarkus 3.0.1. More details on this release may be found in the changelog.
WildFly
The WildFly team has published the 2023-2024 release plan that includes beta and final releases of WildFly 29 through WildFly 34. Releases were temporarily moved to a feature-boxed approach during the transition to Jakarta EE 10. This new release schedule is a return to the previously-used time-boxed approach.
Eclipse Vert.x
Eclipse Vert.x 4.4.2 has been released with dependency upgrades and notable changes such as: a new messageHandler()
method in the GraphQLWSHandler
class to intercept messages; a resolution for erratic behavior using concurrent access in the SchemaRepository
interface; and an improved toObservable()
method in the SQLRowStream
class that eliminates a potential NullPointerException
. More details on this release may be found in the release notes and deprecations and breaking changes.
Similarly, Eclipse Vert.x 3.9.16 has been released that delivers notable fixes: metrics blocking the event loop after the update to Vert.x 3.9.14; and STOMP server process client frames that initially would not send a connect frame. The 3.9 release train reached end-of-life in 2022, but service releases will be maintained until the end of 2023. More details on this release may be found in the release notes.
Micrometer
Versions 1.11.0, 1.10.7 and 1.9.11 of Micrometer Metrics have been released with new features such as: a reduction of overall memory allocation while exporting metrics using the DynatraceExporterV2
class; compiler parameter metadata in the CountedAspect
class is no longer required; and the addition of metrics for the total number of running application threads in the JVM. More details on these releases may be found in the release notes for version 1.11.0, version 1.10.7 and version 1.9.11.
Similarly, versions 1.1.1, 1.1.0, 1.0.6 and 1.0.5 of Micrometer Tracing have been released that provides notable changes that include: a new constructor in the ObservationAwareSpanThreadLocalAccessor
class that accepts an instance of the ObservationRegistry
interface; align annotations that match changes in Micrometer Metrics; no-op implementations for the Propagator
, Propagator.Getter
and Propagator.Setter
interfaces; and an improved getBaggage()
method in the BaggageManager
interface that consistently returns an instance of the Baggage
interface if baggage doesn’t exist. More details on these releases may be found in the release notes for version 1.1.1, version 1.1.0, version 1.0.6 and version 1.0.5.
Apache Software Foundation
The release of Apache Groovy 4.0.12 features bug fixes, dependency upgrades and improvements: a more detailed error message when applying an instance of the ClassNode
class using generics in Abstract Syntax Tree (AST) Transformations; support for virtual threads in the Groovy-Integrated Query (GINQ); and bytecode optimizations for generated methods using Java records. More details on this release may be found in the release notes.
Versions 11.0.0-M6 and 9.0.75 of Apache Tomcat ship with notable changes such as: improvements to the JsonAccessLogValve
class to support more patterns for headers and attributes; improvements to the AccessLogValue
class to change output of vertical tab from \v
to \u000b
and escape the timestamp output if an instance of the SimpleDateFormat
class is used containing verbatim characters. Support for the HTTP connector settings, rejectIllegalHeader
and allowHostHeaderMismatch
, were deprecated in version 9.0.75 and removed in version 11.0.0-M6 and are now hard-coded to the previous default values. More details on these releases may be found in the release notes for version 11.0.0-M6 and version 9.0.75.
Apache Maven 3.9.2 has been released with improvements such as: issue a warning if a plugin depends on Maven Compat; print suppressed exceptions when a Maven Mojo fails; an improvement and extension of plugin validation; and display additional information when using -Dmaven.repo.local.recordReverseTree=true
command line argument. More details on this release may be found in the release notes.
Piranha
The release of Piranha 23.5.0 provides notable changes such as: an update of external components; ensure JDK 18+ modules are released when executing the release with JDK 20; and change --ssl-keystore-file
to --https-keystore-file
. Also, the MimeTypeManager
and LoggingManager
interfaces, TEMPDIR
extension and Piranha Naming modules were all deprecated. More details on this release may be found in their documentation and issue tracker.
Project Reactor
Project Reactor 2022.0.7, the seventh maintenance release, provides dependency upgrades to reactor-core
3.5.6, reactor-netty
1.1.7 and reactor-kafka
1.3.18. There was also a realignment to version 2022.0.7 with the reactor-pool
1.0.0, reactor-addons
3.5.1 and reactor-kotlin-extensions
1.2.2 artifacts that remain unchanged. More details on this release may be found in the changelog.
JobRunr
The release of JobRunr and JobRunr Pro 6.2.0 delivers: an important bugfix for JobRunr on the Windows platform; improved performance; and dependency upgrades to support Spring Boot 3.0 and Quarkus 3.0. More details on this release may be found in the release notes.
JDKMon
Versions 17.0.57, 17.0.55 and 17.0.53 of JDKMon, a tool that monitors and updates installed JDKs, has been made available this past week. Created by Gerrit Grunwald, principal engineer at Azul, these new versions provide changes such as: CVE detection now supports CVSS 2 and CVSS 3; download dialog for builds of OpenJDK now supports the standard C library (libc) selection, e.g., musl libc; a fix for the Linux script to build the application installer; and the addition of a Linux RPM build for the AArch64 architecture.
Devoxx United Kingdom
Devoxx United Kingdom was held at the Business Design Centre in London, England, this past week featuring speakers from the Java community who delivered talks on topics such as: Java, Cloud, Data, AI, Machine Learning, Robotics, Programming Languages, Security, Architecture, Developer Practices and Culture.