BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Java News Roundup: JEPs for JDK 21, MicroStream to Eclipse, Helidon, Piranha, Gradle 8.1

Java News Roundup: JEPs for JDK 21, MicroStream to Eclipse, Helidon, Piranha, Gradle 8.1

Bookmarks

This week's Java roundup for April 10th, 2023 features news from OpenJDK, JDK 21, Spring Framework and Spring Data updates, GraalVM Build Tools 0.9.21, MicroStream becomes an Eclipse Project, Micronaut 3.8.9, Helidon 4.0.0.Alpha6, Hibernate ORM 6.2.1, Micrometer Metrics 1.11.0-RC1, 1.10.6 and 1.9.10, Micrometer Tracing 1.1.0-RC1 and 1.0.4, Piranha 23.4.0, Project Reactor 2022.0.6 and Gradle 8.1.

OpenJDK

After its review had concluded, JEP 444, Virtual Threads, has been promoted from Proposed to Target to Targeted status for JDK 21. This JEP proposes to finalize this feature based on feedback from the previous two rounds of preview: JEP 436, Virtual Threads (Second Preview), delivered in JDK 20; and JEP 425, Virtual Threads (Preview), delivered in JDK 19. This feature provides virtual threads, lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications, to the Java platform. The most significant change from JEP 436 is that virtual threads now fully support thread-local variables by eliminating the option to opt-out of using these variables. More details on JEP 425 may be found in this InfoQ news story and this JEP Café screen cast by José Paumard, Java developer advocate, Java Platform Group at Oracle.

Similarly, JEP 430, String Templates (Preview), has been promoted from Proposed to Target to Targeted status for JDK 21. This preview JEP, under the auspices of Project Amber, proposes to enhance the Java programming language with string templates, string literals containing embedded expressions, that are interpreted at runtime where the embedded expressions are evaluated and verified.

JEP 442, Foreign Function & Memory API (Third Preview), has been promoted from Candidate to Proposed to Target for JDK 21. This JEP incorporate refinements based on feedback and to provide a third preview from: JEP 434, Foreign Function & Memory API (Second Preview), delivered in JDK 20; JEP 424, Foreign Function & Memory API (Preview), delivered in JDK 19, and the related incubating JEP 419, Foreign Function & Memory API (Second Incubator), delivered in JDK 18; and JEP 412, Foreign Function & Memory API (Incubator), delivered in JDK 17. This feature provides an API for Java applications to interoperate with code and data outside of the Java runtime by efficiently invoking foreign functions and by safely accessing foreign memory that is not managed by the JVM. Updates from JEP 434 include: centralizing the management of the lifetimes of native segments in the Arena interface; enhanced layout paths with a new element to dereference address layouts; and removal of the VaList class. The review is expected to conclude on April 21, 2023.

JEP 445, Flexible Main Methods and Anonymous Main Classes (Preview), has been promoted from its JEP Draft 8302326 to Candidate status. This feature JEP, formerly entitled Implicit Classes and Enhanced Main Methods (Preview), proposes to "evolve the Java language so that students can write their first programs without needing to understand language features designed for large programs." This JEP moves forward the September 2022 blog post, Paving the on-ramp, by Brian Goetz, Java language architect at Oracle.

Paul Sandoz, Java architect at Oracle has submitted JEP Draft 8305868, Vector API (Sixth Incubator). 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).

JDK 21

Build 18 of the JDK 21 early-access builds was also made available this past week featuring updates from Build 17 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.

Spring Framework

Versions 6.0.8, 5.3.27 and 5.2.24.RELEASE of Spring Framework have been released to primarily address CVE-2023-20863, Spring Expression DoS Vulnerability, a vulnerability in which an attacker to provide a specially crafted Spring Expression Language expression that may cause a denial-of-service (DoS) condition. Other new features include: a new overloaded truncate() method defined in the StringUtils class to serve as centralized, consistent way for truncating strings; a new nullSafeConciseToString() method defined in the ObjectUtils class to generate a more "concise" null-safe toString() representation of various objects that does not include an entire object graph; and replace the use of the unmodifiableList() method defined in the Collections class with the copyOf() method defined in the List interface which results in Spring application code that more readable, prevents unexpected bugs and easier to maintain. More details on these releases may be found in the release notes for version 6.0.8, version 5.3.27 and version 5.2.24.RELEASE.

Spring Data 2023.0-RC1, 2022.0.5 and 2021.2.11 have been released this past week. Version 2023.0-RC1 features: the reinstatement of MariaDB support for Spring Data R2DBC; a new @Hint annotation in Spring Data MongoDB with support for reactive bulk operations; and many enhancements to the Spring Data JPA Hibernate and JPQL parsers to better support aliases and other aspects of query parsing for @Query annotated queries. Versions 2022.0.5 and 2021.2.11 are service releases that ship with improvements and bug fixes for regressions. These versions may be consumed with the upcoming releases of Spring Boot 3.0.6 and 2.7.11, respectively.

GraalVM Native Build Tools

On the road to version 1.0, Oracle Labs has released version 0.9.21 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 to ensure compatibility with Gradle's configuration cache; deprecate the requiredVersion property in favor of using a version string; and a new write-args-file Maven goal that writes an arguments file such that other plugins downstream in the life cycle may use it. More details on this release may be found in the changelog.

MicroStream

MicroStream has announced that their Java-native persistence layer will become an Eclipse Project. The MicroStream Serializer product will be renamed to Eclipse Serializer and the MicroStream Persistence product will be renamed to EclipseStore. MicroStream also plans to launch an EclipseStore Working Group as a standard for the Jakarta Persistence specification in which EclipseStore will become a compatible implementation.

Micronaut

The Micronaut Foundation has released Micronaut Framework 3.8.9 featuring bug fixes, support for JDK 20 in annotation processors and updates to modules: Micronaut AWS and Micronaut Kafka. There was also a dependency upgrade to Netty 4.1.91. More details on this release may be found in the release notes.

The fourth milestone release of Micronaut 4.0.0 was also made available this past week featuring support for: annotation-based CORS configuration; compilation time expressions in annotations; the ability to disable streaming HTTP request processing; and conditional routing.

Helidon

The sixth alpha release of Helidon 4.0.0 features notable changes such as: support for JDK 20; completion of the shortcut methods for all HTTP methods in the WebServer and WebClient components; and a rename of the receive() method to onMessage() for consistency with other methods in the WebSocket component. More details on this release may be found in the release notes.

Hibernate

The release of Hibernate ORM 6.2.1.Final ships with notable fixes such as: improved sub-queries using aliases and left joins; generic associations being ignored when dirty checking and bytecode enhancement were enabled; part of a composite @IdClass primary key not being returned when querying; and Internal nullness marking and checking.

Micrometer

Versions 1.11.0-RC1, 1.10.6 and 1.9.10 of Micrometer Metrics have been released. New features in version 1.11.0-RC1 include: a new Supplier variant of the getOrDefault() method defined in the Context inner class of the Observation interface; metrics support for Netty allocators and event executors; and more efficient cumulative count computations in the takeCountSnapshot() method defined in the AbstractTimeWindowHistogram class. Version 1.10.6 and 1.9.10 primarily provide bug fixes and dependency upgrades.

Similarly, versions 1.1.0-RC1 and 1.0.4 of Micrometer Tracing deliver bug fixes, dependency upgrades to Micrometer 1.11.0-RC1 and 1.10.6, respectively, and new features: allow propagation of spans via ThreadLocalAccessor interface; alignment with annotations changes in Micrometer; and support for creating spans with links.

Piranha

Piranha 23.4.0 has been released. Dubbed the "Update Components" edition for April 2023, this new release includes: updates to various compatible implementations of Jakarta EE components to their latest versions; update running automated tests in the release workflow to use JDK 19; and basic code cleanup. More details on this release may be found in their documentation and issue tracker.

Reactor

Project Reactor 2022.0.6, the sixth maintenance release, provides dependency upgrades to reactor-core 3.5.5, reactor-addons 3.5.1, reactor-netty 1.1.6, reactor-kafka 1.3.17 and reactor-kotlin-extensions 1.2.2. More details on this release may be found in the changelog.

Gradle

The release of Gradle 8.1 features: a stable version of the configuration cache; support for dependency verification; improved error reporting for Groovy closures; support for Java lambdas; improved memory management; and support for building projects with JDK 20. More details on this release may be found in the release notes.

About the Author

Rate this Article

Adoption
Style

BT