This week's Java roundup for May 27th, 2024, features news highlighting: four JEPs targeted for JDK 23, namely: JEP 482, Flexible Constructor Bodies (Second Preview), JEP 481, Scoped Values (Third Preview), JEP 480, Structured Concurrency (Third Preview) and JEP 471, Deprecate the Memory-Access Methods in Unsafe for Removal; and the releases of JHipster 8.5, Gradle 8.8 and Spring AI 1.0-M1.
OpenJDK
After its review has concluded, JEP 482, Flexible Constructor Bodies (Second Preview), has been promoted from Proposed to Target to Targeted for JDK 23. This JEP proposes a second round of preview and a name change to obtain feedback from the previous round of preview, namely JEP 447, Statements before super(...) (Preview), delivered in JDK 22. This feature allows statements that do not reference an instance being created to appear before the this()
or super()
calls in a constructor; and preserve existing safety and initialization guarantees for constructors. Changes in this JEP include: a treatment of local classes; and a relaxation of the restriction that fields can not be accessed before an explicit constructor invocation to a requirement that fields can not be read before an explicit constructor invocation. Gavin Bierman, consulting member of technical staff at Oracle, has provided an initial specification of this JEP for the Java community to review and provide feedback.
After its review has concluded, JEP 481, Scoped Values (Third Preview), has been promoted from Proposed to Target to Targeted for JDK 23. Formerly known as Extent-Local Variables (Incubator), this JEP proposes a third preview, with one change, in order to gain additional experience and feedback from one round of incubation and two rounds of preview, namely: JEP 464, Scoped Values (Second Preview), delivered in JDK 22; JEP 446, Scoped Values (Preview), delivered in JDK 21; and JEP 429, Scoped Values (Incubator), delivered in JDK 20. This feature enables sharing of immutable data within and across threads. This is preferred to thread-local variables, especially when using large numbers of virtual threads. The change in this feature is related to the operation parameter of the callWhere()
method, defined in the ScopedValue
class, now a functional interface which allows the Java compiler to infer whether a checked exception might be thrown. With this change, the getWhere()
method is no longer needed and has been removed.
After its review has concluded, JEP 480, Structured Concurrency (Third Preview), has been promoted from Proposed to Target to Targeted for JDK 23. This JEP proposes a third preview, without change, in order to gain more feedback from the previous two rounds of preview, namely: JEP 462, Structured Concurrency (Second Preview), delivered in JDK 22; and JEP 453, Structured Concurrency (Preview), delivered in JDK 21. This feature simplifies concurrent programming by introducing structured concurrency to “treat groups of related tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability.”
After its review has concluded, JEP 471, Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal, has been promoted from Proposed to Target to Targeted for JDK 23. This JEP proposes to deprecate the memory access methods in the Unsafe
class for removal in a future release. These unsupported methods have been superseded by standard APIs, namely; JEP 193, Variable Handles, delivered in JDK 9; and JEP 454, Foreign Function & Memory API, delivered in JDK 22.
Build 23-loom+4-102 of the Project Loom early-access builds are based on JDK 23 Build 25 and improves the implementation of Java monitors (synchronized methods) to work better with virtual threads.
Build 22-jextract+5-33 of the Project Jextract early-access builds, also known as Project Panama, are based on JDK 22 and provides a recommendation in which the quarantine attribute from the bits may need to be removed before using the jextract
binaries on macOS Catalina or later.
JDK 23
Build 25 of the JDK 23 early-access builds was made available this past week featuring updates from Build 24 that include fixes for various issues. Further details on this release may be found in the release notes.
Jakarta EE
In his weekly Hashtag Jakarta EE blog, Ivar Grimstad, Jakarta EE developer advocate at the Eclipse Foundation, has provided an additional update on the upcoming GA release of Jakarta EE 11.
Nine (9) specifications, namely - Jakarta Annotations 3.0, Jakarta Authorization 3.0, Jakarta Contexts and Dependency Injection 4.1, Jakarta Expression Language 6.0, Jakarta Interceptors 2.2, Jakarta RESTful Web Services 4.0, Jakarta Persistence 3.2, Jakarta Validation 3.1 and Jakarta WebSocket 2.2 - have been finalized for Jakarta EE 11.
Five (5) specifications, namely - Jakarta Concurrency 3.1, Jakarta Data 1.0, Jakarta Faces 4.1, Jakarta Pages 4.0 and Jakarta Servlet 6.1 - should have their respective reviews completed during the week of June 3, 2024.
And reviews for the remaining two (2) specifications, Jakarta Authentication 3.0 and Jakarta Security 4.0, should start during the week of June 10, 2024.
Discussing the remaining work required for the GA release, Grimstad stated:
There is some work to be done on the TCK and the specification documents before the release reviews of the Jakarta EE 11 Platform, Jakarta EE 11 Web Profile, and Jakarta EE 11 Core Profile specifications can start. This will likely happen in late June or early July, so we are on track according to the release plan.
GlassFish
GlassFish 7.0.15, fifteenth maintenance release in the 7.0.0 release train, provides improvements in documentation, dependency upgrades and notable resolutions to issues such as: a ClassCastException
due to improper classloader matching in the Weld BeanDeploymentArchive
interface; cluster monitoring data not being displayed in the Admin Console; and an IllegalArgumentException
in the toString()
method, defined in the Application
class, due to a bundle without descriptor being valid. More details on this release may be found in the release notes.
TornadoVM
TornadoVM 1.0.5, the fifth maintenance release, ships with bug fixes and improvements such as: support for Vector types at the API level in the variants of the Floatx<Width>
class with variants of Intx<Width>
class; an improved OpenCL build log; an improvements in the TornadoOptions
and TornadoLogger
classes where all options (debug, events, etc.) have been moved to the former and all debugging has been moved to the latter.
Spring Framework
It was a very quiet week at Spring compared to the release activity during the week of May 20, 2024.
Following the release of Spring Boot 3.3.0, 3.2.6 and 3.1.12, versions 3.0.16 and 2.7.21 were released this past week featuring many dependency upgrades and notable bug fixes: when graceful shutdown of Tomcat is aborted, it may report that it completed successfully; and resolving an instance of the BuildpackReference
class, created from a URL-like String, can fail on Windows. Further details on these releases may be found in the release notes for version 3.0.16 and version 2.7.21.
Spring Cloud 2023.0.2, codenamed Leyton, and 2022.0.7 Enterprise Edition have been released featuring featuring bug fixes and notable updates to sub-projects: Spring Cloud Kubernetes 3.1.2; Spring Cloud Function 4.1.2; Spring Cloud OpenFeign 4.1.2; Spring Cloud Stream 4.1.2; and Spring Cloud Gateway 4.1.4. This release is based on Spring Boot 3.3.0. More details on this release may be found in the release notes.
The first milestone release of Spring AI 1.0.0 delivers new features such as: a new ChatClient fluent API, composed of the ChatClient
interface and Builder
inner class, providing methods to construct an instance of a Prompt
class, which is then passed as input to an AI model; eight (8) new AI models; updated existing models; and support for Testcontainers. Developers interested in learning more can follow this example application.
Versions 3.3.0-RC1, 3.2.5 and 3.1.12 of Spring Shell have been released featuring a breaking change that replaces the use of the Spring Boot ApplicationArguments
interface with a plain String
array in the ShellRunner
interface and its implementations. Default methods to bridge new methods were created and old methods were deprecated with a plan to remove them in Spring Shell 3.4.x. This is part of on-going work to remove all Spring Boot classes from the Spring Shell core package. These versions build upon Spring Boot 3.3.0, 3.2.5 and 3.1.12, respectively, and JLine 3.26.1. Further details on these releases may be found in the release notes for version 3.3.0-RC1, version 3.2.5 and version 3.1.12.
Helidon
The release of Helidon 4.0.9 ships with notable changes such as: a resolution to an IndexOutOfBoundsException
generated from the first(String)
method, defined in the Parameters
interface, due to index 0 being out of bounds for an array of length 0; a refactor of the OCI metrics library code is organized so other implementations can extend common types without having to also include the OCI metrics library CDI module; and improvements to the WebClientSecurity
class against absent or disabled tracing. More details on this release may be found in the release notes.
Quarkus
The release of Quarkus 3.11 delivers notable changes such as: a new OidcRedirectFilter
interface to dynamically customize OIDC redirects; initial support of security integration for the WebSockets Next extension; and a new Infinispan Cache extension that will replace the now-deprecated @CacheResult
annotation. Further details on this release may be found in the release notes. InfoQ will follow up with a more detailed news story.
Micronaut
The Micronaut Foundation has released version 4.4.3 of the Micronaut Framework featuring Micronaut Core 4.4.10, bug fixes, improvements in documentation and updates to modules: Micronaut Data and Micronaut Test Resources. More details on this release may be found in the release notes.
WildFly
WildFly 32.0.1, first maintenance release, delivers component upgrades and notable resolutions to issues such as: a ClassCastException
when running live-only High Availability policy in the messaging-activemq
subsystem; a possible NoSuchElementException
upon deploying multiple OpenAPI endpoints; and restoration of the io.smallrye.opentelemetry
module to the OpenTelemetryDependencyProcessor
class as this module is required on the deployment classpath since that contains the CDI provider method providing the implementation of the OpenTelemetry Tracer
interface. Further details on this release may be found in the release notes.
Hibernate
The release of Hibernate Reactive 2.3.1.Final ships with dependency upgrades and a resolution to a NullPointerException
due to a method that converts the generated ID from the database to a ResultSet
was not implemented. This release is compatible with Hibernate ORM 6.5.2.Final. More details on this release may be found in the release notes.
Apache Software Foundation
Apache Maven 4.0.0-beta-3 provides bug fixes, dependency upgrades and improvements such as: initial support for Maven 4.0 API to be usable outside of the runtime; changes in the PathType
interface to control the type of path where each dependency can be placed; and support for the fatjar
, a dependency type to be used when dependency is considered self contained. Further details on this release may be found in the release notes.
Similarly, Apache Maven 3.9.7 ships with bug fixes, dependency upgrades and new features: support for wildcards in an OS version to specify wildcard in the OS version tag; and the ability to ignore transitive dependency repositories using the mvn
-itr
command. More details on this release may be found in the release notes.
Maintaining alignment with Quarkus, the release of Camel Quarkus 3.11.0, composed of Camel 4.6.0 and Quarkus 3.11.0, provides resolutions to notable issues such as: Quarkus Infinispan not compatible with Camel Infinispan due to differences in Infinispan version support; and improved auto-configuration by moving the options for the SupervisingRouteController
interface into its own group. Further details on this release may be found in the release notes.
JobRunr
Version 7.2.0 of JobRunr, a library for background processing in Java that is distributed and backed by persistent storage, has been released featuring bug fixes, dependency upgrades and new features such as: support for Spring Boot 3.3.0 where JobRunr now declares the spring-boot-starter
dependency with a provided
scope; support for Kotlin 2.0.0 (support for Kotlin 1.7.0 ahs been dropped); and deleting a job using the JobScheduler
or JobRequestScheduler
classes will be retried if a ConcurrentJobModificationException
is thrown. More details on this release may be found in the release notes.
JHipster
The release of JHipster 8.5.0 delivers: support for Spring Boot 3.3.0; a resolution to issues with OIDC claims in the SecurityUtils
class when the syncUserWithIdp
boolean is set to false
; and resolutions to multiple issues with SonarCloud, used by JHipster for code quality. Further details on this release may be found in the release notes. InfoQ will follow up with a more detailed news story.
JDKUpdater
Versions 14.0.53+75 and 14.0.51+73 of JDKUpdater, a new utility that provides developers the ability to keep track of updates related to builds of OpenJDK and GraalVM. Introduced in mid-March by Gerrit Grunwald, principal engineer at Azul, these releases include: an update in the base URL for CVE details; and modifications related to menu items. More details on this release may be found in the release notes for version 14.0.53+75 and version 14.0.51+73.
Gradle
The release of Gradle 8.8 delivers: full support for JDK 22; a preview feature to configure the Gradle daemon JVM using toolchains; improved IDE performance with large projects; and improvements to build authoring, error and warning messages, the build cache, and the configuration cache. Further details on this release may be found in the release notes.