This week's Java roundup for November 20th, 2023, features news from OpenJDK, JDK 22, JCON World 2023, and point, milestone and GA releases for: Spring Boot, Spring Framework, Spring Security, Spring Authorization Server, Spring GraphQL, Spring Integration, Spring Session, Spring Vault, Quarkus, Hibernate ORM, Hibernate Search, Infinispan, JHipster, JBang, OpenXava, Testcontainers and Gradle.
OpenJDK
After its review has concluded, JEP 447, Statements before super(...) (Preview), has been promoted from Proposed to Target to Targeted for JDK 22. This JEP, under the auspices of Project Amber, proposes to: allow 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. 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.
JEP 461, Stream Gatherers (Preview), has been promoted from Candidate to Proposed to Target for JDK 22. This JEP proposes to enhance the Stream API to support custom intermediate operations. "This will allow stream pipelines to transform data in ways that are not easily achievable with the existing built-in intermediate operations." More details on this JEP may be found in the original design document written by Viktor Klang, software architect, Java Platform Group at Oracle. The review is expected to conclude on November 29, 2023.
JEP 462, Structured Concurrency (Second Preview), has been promoted from Candidate to Proposed to Target for JDK 22. This JEP will propose to re-preview the API in JDK 22, without change, in order to gain more feedback from the previous round of preview: 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." The review is expected to conclude on December 1, 2023.
JEP 458, Launch Multi-File Source-Code Programs, has been promoted from Candidate to Proposed to Target for JDK 22. This JEP proposes to enhance the Java Launcher to execute an application supplied as one or more files of Java source code. This allows a more gradual transition from small applications to larger ones by postponing a full-blown project setup. The review is expected to conclude on December 1, 2023.
JDK 22
Build 25 of the JDK 22 early-access builds was made available this past week featuring updates from Build 24 that include fixes to various issues. Further details on this build may be found in the release notes.
For JDK 22, developers are encouraged to report bugs via the Java Bug Database.
Spring Framework
The release of Spring Boot 3.2.0 delivers bug fixes, improvements in documentation, dependency upgrades and new features such as: support for Oracle Free, the replacement for Oracle XE, that comes with Testcontainers and Docker Compose; a change in parameter name discovery that replaces deducing parameter names by parsing bytecode; support for Jetty 12; and support for the new RestClient
interface that was introduced in Spring Framework 6.1. More details on this release may be found in the release notes.
Similarly, versions 3.1.6, 3.0.13 and 2.7.18 of Spring Boot provides bug fixes, improvements in documentation, dependency upgrades and a new feature in which the default Cloud Native Buildpacks (CNBs) have been upgraded to Paketo Jammy due to the Paketo Bionic Builder having been declared as unsafe. More details on these releases may be found in the version 3.1.6, version 3.0.13 and version 2.7.18.
The release of Spring Framework 6.1.1 ships with bug fixes, improvements in documentation and new features such as: skip unnecessary buffer allocation in the copy(String)
method defined in the StreamUtils
class; and a fix for concurrency leaks large amounts of non-heap memory in JDK 17 from the isReadable()
method defined in the Resource
interface. More details on this release may be found in the release notes.
The release of Spring Security 6.2.0 delivers bug fixes, dependency upgrades and new features: support for Kotlin coroutines in the AuthorizationManagerBeforeReactiveMethodInterceptor
and AuthorizationManagerAfterReactiveMethodInterceptor
classes; and a simplification on configuring the OAuth2 Client component model. More details on this release may be found in the release notes and What's New page.
The release of Spring Authorization Server 1.2.0 provides improvements in documentation, dependency upgrades and new features such as: allow a configurable refresh token strategy for AUTHORIZATION_CODE
and REFRESH_TOKEN
grant types defined in the Spring Security AuthorizationGrantType
class; and introduce Ahead-of-Time (AOT) optimizations, or AOT hints, for types and resources used across the codebase to resolve failure in generating native images with GraalVM. More details on this release may be found in the release notes.
The release of Spring for GraphQL 1.2.4 ships with bug fixes, improvements in documentation, dependency upgrades and new features such as: improved parsing of the line
and column
attributes from the GraphQL SourceLocation
class within the ResponseMapGraphQlResponse
class; and use of the isOmitted()
method rather than the isPresent()
method from the ArgumentValue
class within ArgumentValueValueExtractor
class to allow validation of null
arguments. More details on this release may be found in the release notes.
The release of Spring Integration 6.2.0 delivers notable changes such as: a fix for a race condition within the HazelcastMetadataStoreTests
class; a more robust readRaw()
and finalizeRaw()
methods defined in the FtpSession
class to eliminate exceptions thrown due to 550 FTP Response errors; and an increase in the timeout for the FTP RotatingServersTests
class due to unknown delays on MacOS that cause the tests to fail. More details on this release may be found in the release notes and What's New page.
The release of Spring Session 3.2.0 provides many dependency upgrades and a new feature in which improvements in documentation and logging have been made if a rememberMeRequestAttribute
attribute has not been set within a custom implementation of the CookieSerializer
interface. More details on this release may be found in the release notes and What's New page.
The release of Spring Vault 3.1 ships with improvements in documentation, dependency upgrades and new features such as: support for HashiCorp Vault role_name
and entity_alias
parameters in the VaultTokenRequest
class; and a new AuthenticationEventMulticaster
interface to manage a number of AuthenticationEvent
and AuthenticationErrorEvent
objects and publish events to them. More details on this release may be found in the release notes.
The release of Spring for Apache Pulsar 1.0.0 delivers notable changes such as: the PulsarAdministration
class now accepts multiple instances of the PulsarAdminBuilderCustomizer
interface; and a dependency break with Spring Boot to avoid a "chicken-and-egg" problem for times when Spring Boot has a dependency on Spring for Apache Pulsar. More details on this release may be found in the release notes.
Version 3.1.0 of Spring for Apache Kafka and Spring for RabbitMQ have been released to provide bug fixes, improvements in documentation and dependency upgrades. New features in Spring for Apache Kafka include: removal of setting the brokerListProperty
property within the EmbeddedKafkaKraftBroker
class that could lead to an exception if the property is null
; and provide a way to define a ContainerCustomizer
bean name to associate with the @KafkaListener
annotation. More details on this release may be found in the release notes for Apache Kafka and for RabbitMQ.
Versions 1.1.0 and 1.0.3 of Spring Modulith have been released that ship with bug fixes, dependency upgrades and new features such as: use the Spring Framework BeanFactoryInitializationAotProcessor
interface to initialize actuator endpoints on native images rather than the ApplicationModules
class; and a warning to alert developers that the updateFirst()
method defined in the Spring Data MongoTemplate
class does not support sort operations. Developers should instead use the findAndModify()
method. More details on this release may be found in the release notes for version 1.1.0 and version 1.0.3.
Eclipse Store
The Eclipse Foundation has released version 1.0.0 of EclipseStore, a Java native-persistence library. Formerly known as MicroStream, this new version is the initial release under the Eclipse Foundation and a migration from MicroStream Storage 8.1.1. More details on this release may be found in the release notes.
Quarkus
Red Hat has released version 3.5.3 of Quarkus 3.5.3 featuring notable changes such as: a switch from HashMap
to LinkedHashMap
in the MultipartFormDataOutput
class to maintain the users' input order; and ensure that authentication and authorization occur before the WebSocket injector for GraphQL is injected. More details on this release may be found in the changelog.
Similarly, Quarkus 3.2.9.Final has also been released with notable changes such as: a resolution to the @ServerResponseFilter
annotation with a Throwable
parameter not being called when a REST resource is throwing an exception; and handle duplicate contexts that get mixed when caching the response of a REST call via the CacheResultInterceptor
class. More details on this release may be found in the changelog.
Hibernate
The release of Hibernate ORM 6.4.0.Final delivers: a new @SoftDelete
annotation to support soft deletes, values as deleted/non-deleted versus active/inactive (reversed); implementation of the remaining functions for handling arrays in HQL and Criteria queries; and support for writing Hibernate-specific events in the JDK Flight Recorder.
The second release candidate of Hibernate Search 7.0.0 features: bug fixes; compatibility with Jakarta EE, the Hibernate ORM discriminator-based multi-tenancy, Elasticsearch 8.11 and OpenSearch 2.10 and 2.11; and dependency upgrades to Hibernate ORM 6.4.0.Final and Apache Lucene 9.8. Hibernate Search 7.0.0.CR2 requires a minimal version of JDK 11.
Infinispan
Version 15.0.0.Dev05 of Infinispan has been released with notable changes such as: the use of the Spring Framework @DirtiesContext
annotation on Spring tests to force the cache manager to stop; an improved WriteSkewConsistencyTest
class to resolve random failures; and update the Jakarta JSON Processing dependency from the javax.*
namespace to the jakarta.*
namespace as required by WildFly Elytron 2.x. More details on this release may be found in the list of issues.
Similarly, version 14.0.21.Final of Infinispan has also been released with notable changes such as: default methods in the Java ConcurrentMap
interface should ensure that their iterators are closed upon encountering an error; improvements in implementing virtual threads; and the creation of metrics to measure latency between nodes. More details on this release may be found in the list of issues.
JHipster
Version 0.49.0 of JHipster Lite has been released featuring bug fixes, dependency upgrades and enhancements: GraalVM automated builds; and a package-info.java
file in their Dummy feature. More details on this release may be found in the release notes.
JBang
Versions 0.113.0 and 0.112.4 of JBang deliver notable changes such as: a new magic expansion on the command line that will resolve dependencies within that expression and replace it with a classpath (see example below); a fix for when a custom port is provided via the --debug
command line parameter, the default of 4004 is still used; and an updated docker-compose
file for testing proxies that require authentication. More details on these releases may be found in the release notes for version 0.113.0 and version 0.112.4.
The new command line expansion allows developers to write something like:
$ jbang sqlline@maxandersen -cp other args
OpenXava
The release of OpenXava 7.2.0 features bug fixes, dependency upgrades and new features such as: support for JDK 21; improvements to the calendar to show the week or the day; and numerous web security enhancements. More details on this release may be found in the release notes.
Testcontainers for Java
Testcontainers for Java 1.19.3 has been released with notable bug fixes such as: register missing default network aliases using the ContainerDef
class; a regression due to a breaking change upon using the setImage()
method defined in the GenericContainer
class; and bugs within the SQLScriptScanner
with large String literals and PostgreSQL identifiers.
Gradle
The fourth release candidate of Gradle 8.5.0 delivers continuous improvements on new features such as: full support for compiling, testing and running on JDK 21; improvements in the Kotlin DSL that include faster first use and version catalog support in precompiled Kotlin script plugins; and improved reporting of errors and warnings. More details on this release may be found in the release notes.
JCON World
The JCON World 2023 conference, the international online Java community conference organized by the Java User Group Oberpfalz, was held this past week, featuring over 100 speakers from the Java community who presented keynote addresses, one-hour sessions and workshops over a three-day timeframe.