It was a relatively quiet news week for the November 22nd, 2021 edition of the Java roundup featuring news from OpenJDK JEPs, JDK 18, Project Loom Build 18-loom+6-282, Spring HATEOAS 1.4, Micronaut 3.2, Quarkus 2.5.0, Apache Camel Quarkus 2.5.0 and JDKMon 17.0.14.
OpenJDK
After its review had concluded, JEP 419, Foreign Function & Memory API (Second Incubator), was promoted from Proposed to Target to Targeted for JDK 18. This JEP evolves the first incubator, JEP 412, Foreign Function & Memory API (Incubator), delivered in JDK 17, to incorporate improvements based on Java community feedback. Changes in this second incubator include: support for more carriers in memory access var handles such as boolean
and MemoryAddress
interface; a more general dereference API for the MemoryAddress
and MemorySegment
interfaces; a simpler API to obtain downcall methods handles such that passing a MemoryType
enumeration is no longer necessary; and a new API to copy Java arrays to and from memory segments.
Similarly, JEP 420, Pattern Matching for switch (Second Preview), has been promoted from Proposed to Target to Targeted for JDK 18. This JEP allows a target switch
expression to be tested against a number of patterns, each with a specific action, allowing complex data-oriented queries to be expressed concisely and safely. This is the second preview following JEP 406, Pattern Matching for switch (Preview), that was delivered in JDK 17. Enhancements include: an improvement in dominance checking that forces a constant case
label to appear before a guarded pattern of the same type; and an exhaustiveness checking of the switch block is now more precise with sealed hierarchies.
Brian Goetz, Java language architect at Oracle, spoke to InfoQ in September 2017 when pattern matching was still in its proof-of-concept phase. Pattern matching for the instanceof
operator, JEP 394, was delivered in JDK 16.
JDK 18
Build 25 of the JDK 18 early-access builds was made available this past week, featuring updates from Build 24 that include fixes to various issues. More details may be found in the release notes.
The feature set for JDK 18 currently stands as follows:
- JEP 400: UTF-8 by Default
- JEP 408: Simple Web Server
- JEP 413: Code Snippets in Java API Documentation
- JEP 416: Reimplement Core Reflection with Method Handles
- JEP 417: Vector API (Third Incubator)
- JEP 418: Internet-Address Resolution SPI
- JEP 419: Foreign Function & Memory API (Second Incubator)
- JEP 420: Pattern Matching for switch (Second Preview)
Developers are encouraged to report bugs via the Java Bug Database.
Project Loom
Build 18-loom+6-282 of Project Loom early-access builds was made available to the Java community and is based on Build 24 of the JDK 18 early access builds.
Spring Framework
After a couple of busy weeks for the Spring team, the only activity this past week was the release of Spring HATEOAS 1.4 with new features such as: support for level 4 URI templates; support for non-composite request parameter rendering; improved support for the HAL-FORMS media type; additional HTML input types; and dependency upgrades to Spring Framework 5.3.13 and Jackson 2.13.9. More details may be found in the changelog.
Micronaut
The Micronaut Foundation has released Micronaut 3.2 featuring support for GraalVM 21.3.0, Gradle Plugin 3.0.0, Kotlin 1.6.0, a host of HTTP features, and upgrades to some of their modules such as Micronaut Data, Micronaut Security, Micronaut Kubernetes, and Micronaut Elasticsearch. Further details may be found in the documentation.
Quarkus
Red Hat has released Quarkus 2.5.0.Final featuring: a dependency upgrade to Mandrel 21.3, a downstream distribution of GraalVM community edition; support for JPA entity listeners for Hibernate ORM in native mode; the ability to add HTTP headers to server responses using the quarkus.http.header
property; and usability improvements in Quarkus extensions and the dev mode and testing infrastructure.
Apache Camel
Maintaining alignment with Quarkus, version 2.5.0 of Camel Quarkus was released featuring Quarkus 2.5.0.Final, Apache Camel 3.13.0, improved test coverage and documentation. More details may be found in the list of issues.
JDKMon
The latest version of JDKMon, a new tool that monitors and updates installed JDKs, has been made available to the Java community. Created by Gerrit Grunwald, principal engineer at Azul, version 17.0.14 ships with new features such as: automatically adding JDK distributions hosted by SDKMAN! and any corresponding Java folder to search paths, if available; and display a link to release details, if available, for any updates found.