JDK 14 Feature Set Frozen |
Written by Kay Ewbank | |||
Tuesday, 25 February 2020 | |||
Java Development Kit (JDK) 14 is now at the release candidate stage and the feature set for the March 2020 release has been frozen. Highlights of the new version will include extra pattern matching, better handling of switch expressions, and an API for the JDK Flight Recorder. The first change worth mentioning is support for pattern matching for instanceof. Pattern matching allows common logic in a program, specifically the conditional extraction of components from objects, to be expressed more concisely and safely. Instanceof is used to check whether the object reference is an instance of a specific type. A packaging tool has also been added to the new release. The tool is based on the JavaFX JDK 14 should improve G1 performance on large machines because of a new NUMA-aware memory allocation. Modern multi-socket machines increasingly have non-uniform memory access (NUMA), and while the parallel collector,has been NUMA-aware for many years, other HotSpot collectors have been NUMA-aware. This has been a particular problem for users of the G1 collector, hence the new addition. JFR Event Streaming support has been added that exposes JDK Flight Recorder data for continuous monitoring.. The HotSpot VM emits more than 500 data points using JFR, most of them not available through other means besides parsing log files. The new API enables the continuous consumption of JFR data on disk, both for in-process and out-of-process applications. One of the more controversial additions in this release is a record support in a preview version. Records are a new kind of type declaration in the Java language, and area restricted form of class. The developers say that records give up a freedom that classes usually enjoy: the ability to decouple API from representation. In return, records gain a significant degree of concision. A second preview of text blocks has also been added in this release. Text blocks are multi-line string literals that avoid the need for most escape sequences and automatically format the string in a predictable way. An initial preview of text blocks was included in JDK 13. This preview adds escape sequences for managing explicit white spaces and newline control. More InformationRelated ArticlesOpenJDK 8 To Get JDK Flight Recorder Red Hat Takes Over OpenJDK Maintenance JavaFX Will Be Removed From JDK No Vote For Java Module System To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
|
|||
Last Updated ( Tuesday, 25 February 2020 ) |