Java 14 was released almost a month ago - but one of the great strengths of the new Java release model is that work on the next version never really stops. This means that the release train for Java 15 is already underway.
Although it is still almost two months until feature freeze and rampdown, a number of features for Java 15 have already been announced. These include:
- Hidden Classes (JEP 371)
- Remove the Nashorn JavaScript Engine (JEP 372)
- Text Blocks (Standard) (JEP 378)
A standard version of two new garbage collectors also appears in the feature list:
- ZGC: A Scalable Low-Latency Garbage Collector (JEP 377)
- Shenandoah: A Low-Pause-Time Garbage Collector (JEP 379)
Of these, ZGC has been developed by Oracle and Shenandoah by Red Hat. Both offer similar capabilities - very low pause time and scalability to large heaps - obtained at a cost of overall performance (i.e. a reduction in application throughput).
Java 14 delivered some major milestones as part of the incremental delivery of Project Amber. This included a first preview release of Records, a standard version of Switch Expressions and an initial preview of Pattern Matching for instanceof
.
Although there has been no official announcement yet, it seems very likely that Java 15 will contain further JEPs that continue the delivery of this group of features.
This could include a second Preview or even a final (aka Standard) release of Records. It also seems plausible that Sealed Types will also be targeted at Java 15 - this will almost certainly be as a Preview feature, though.
Another contender for inclusion in JDK 15 is JEP 375 - the Second Preview of Pattern Matching for instanceof. This adds another key step towards pattern matching, by introducing deconstruction patterns for records - which is Java's version of the destructuring concept seen in other languages (e.g. those that use structural typing to implement product types).
The combination of Sealed Types, Records and the introduction of pattern matching as a concept shows the clear direction of travel of the Java language. When combined with the reluctance of the market to adopt non-LTS releases this points to the arrival of fully-fledged pattern matching and nominal algebraic types as final features as part of Java 17 (LTS) in September 2021.