This week's Java roundup for October 11th, 2021, features news from OpenJDK, JDK 18, Spring Framework, Grails 5.0, Micronaut 3.1, Helidon 2.3.4, point and GA releases of Hibernate ORM and Reactive, updates related to the recent GA release of WildFly 25, GraalVM Native Build Tools 0.9.6, Apache Camel 3.11.3, Piranha 21.10.0 and JetBrains introducing the Multik multidimensional array library for Kotlin.
OpenJDK
After a one-week review, JEP 408, Simple Web Server, has been promoted from Proposed to Target to Targeted for JDK 18. This JEP provides a minimal HTTP command-line web server that serves only static files. This utility is designed to be useful for prototyping, ad-hoc coding, and testing, particularly in an educational environment. The server may be started as follows:
$ java -m jdk.httpserver [-b bind address] [-p port] [-d directory] [-h to show help message] [-o none|default|verbose]
JEP 419, Foreign Function & Memory API (Second Incubator), has been promoted from Draft to Candidate status. 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.
JDK 18
Build 19 of the JDK 18 early-access builds was made available this past week, featuring updates from Build 18 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:
- 400: UTF-8 by Default
- 408: Simple Web Server
- 413: Code Snippets in Java API Documentation
- 417: Vector API (Third Incubator)
Developers are encouraged to report bugs via the Java Bug Database.
Spring Framework
Point releases of the Spring Framework were made available this past week.
Version 5.3.11 contains 32 fixes and improvements and version 5.2.18.RELEASE contains 10 fixes and improvements. Both versions feature an enhanced DefaultResponseErrorHandler
class that allows logging a complete error response body. Other new features for version 5.3.11 include: adding support for a non-public record declaration; and directly invoke bean-derived close()
methods on the respective Closeable
and AutoCloseable
interfaces.
Grails
The Grails Foundation has released Grails 5.0 featuring dependency upgrades to Apache Groovy 3, Micronaut Framework 3, Gradle 7, Spring Boot 2.5, Spring Framework 5.3, and Spock 2.0. Other noteworthy changes include: deprecating 'dot'-based navigation; a new default autowire by type replacing autowire by name; and changes to the Gradle plugin. More details may be found in the release notes and documentation. InfoQ will follow up with a more detailed news story.
Micronaut
The Micronaut Foundation has released Micronaut 3.1 that include numerous new features such as: support for JDK 17; factory beans may now create beans that are of primitive or primitive array types; a new @InjectScope
annotation that destroys beans with no defined scope; an optimization on the way classes are generated to support bean introspections; improved support for context propagation with Kotlin; and the ability use regular expressions for HTTP filters.
Helidon
Helidon 2.3.4, a maintenance release, was made available this past week featuring improvements such as: fixing issues with the WebServer component in which [a] the Netty server hangs under load, and [b] a race condition exists when analysing whether entity is fully read; fixing an issue with the WebClient component to relativize a request URI if a host is in the no-host list; and fixing issues with the Metrics component where [a] the new PeriodicExecutor
class can incorrectly log a warning message and the text of that warning could be wrong, and [b] a native-image build fails due to a metrics performance optimization. More details may be found in the release notes.
Hibernate
It was a busy week over at Hibernate as they provided point and GA releases on their Hibernate ORM and Hibernate Reactive projects.
Hibernate ORM 5.6.0.Final was released with a bugfix related to an error when combining the @EmbeddedId
with @MapsId
annotations, a dependency upgrade to ByteBuddy 1.11.20, and additional deprecation warnings in preparation for Hibernate ORM 6.0.
On the road to Hibernate ORM 6.0, the first beta release was made available featuring: a migration to the Jakarta Persistence specification; an improved type system that introduces the new read-by-position concept for reading JDBC results; new type annotations; and improved timezone support. Further details may be found in the user guide, migration guide and release page.
Hibernate Reactive 1.0.0.CR10 was released to include support for automatic schema validation and update for the MySQL, Db2 and MS SQL Server databases.
WildFly
It was also a busy week for the WildFly team as a number of updates related to WildFly 25 have been made available to the Java community.
The WildFly 25 Source-to-Image (S2I) Docker images have been released on quay.io, Red Hat's utility to build, analyze and distribute container images. These images include changes related to the GA release of WildFly 25.
The release of the WildFly Bootable JAR 6.0 Maven plugin features: new examples to demonstrate Galleon provisioning introduced in WildFly 25; automatic generation of a self-signed security certificate; and native support for OpenID Connect. More details may be found in this blog post.
Wildfly 25 now supports the MicroProfile Reactive Messaging 2.0 specification. Based on the SmallRye Reactive Messaging implementation, developers may now take advantage of the new @Channel
annotation and Emitter
interface to push data to a reactive stream from an application.
GraalVM
On the road to version 1.0, Oracle Labs has released version 0.9.6 of Native Build Tools, a GraalVM project consisting of plugins for interoperability with GraalVM Native Image. This release features integration with JUnit 5.8, but introduces a breaking change such that Maven users will be required to define a plugin extension with version 0.9.6:
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native.maven.plugin.version}</version>
<extensions>true</extensions>
</plugin>
The junit-platform-native
dependency is no longer necessary in Maven, but Gradle users will still be required to do so.
Apache Camel
Apache Camel 3.11.3 made available with 26 bug fixes and improvements such as dependency upgrades to Apache Karaf 1.1.11 and Camel Spring Boot 2.5.5. More details may be found in the release notes.
Piranha
Piranha 21.10.0 has been released. Dubbed the "our first supported version" edition, this release features a new support branch to align with LTS Java versions starting with JDK 17 and will also support Jakarta EE. Further details may be found in their documentation and issue tracker.
Introducing the Multik Library for Kotlin
JetBrains has introduced Multik 0.1, a new multidimensional array library for Kotlin, that can read/write .csv
files, perform linear algebra operations, support complex numbers, and improve performance of existing functions. More details may be found in this blog post. InfoQ will follow up with a more detailed news story.