JDK 12 Feature Set Frozen
Written by Kay Ewbank   
Monday, 07 January 2019

The feature set for the next version of Java SE, JDK 12, is now known as the development team has frozen the feature set for the new version. While many of the proposed improvements have made the cut, support for raw string literals is no longer included.

The changes that have made it include a new experimental garbage collector called Shenandoah, a better switch statement, and a variety of improvements to the G1 garbage collector.

corretto

Two main areas of the G1 garbage collector having received attention. The collector has been changed so that all pauses in G1 are abortable. One of the goals of G1 is to meet a user supplied pause time target for its collection pauses. However, until now, if too large a collection set was put in motion, G1 would wait for longer than the desired pause time goal. This can now be detected and aborted. The second change is an enhancement to automatically return Java heap memory to the operating system when idle.

The Shenandoah garbage collector has also been included in an experimental version. This is designed to reduces garbage collection pause times by doing evacuation work concurrently with the running Java threads. Pause times with Shenandoah are independent of heap size, meaning you will have the same consistent pause times whether your heap is 200 MB or 200 GB.

A preview of an extended switch statement is the other main addition to JDK 12. The intention is to extend the switch statement so that it can be used as either a statement or an expression, and that both forms can use either a "traditional" or "simplified" scoping and control flow behavior. These changes will simplify everyday coding, and also prepare the way for the use of pattern matching in switch.

The feature that hasn't made it is support for raw string literals. These were meant to provide a literal that could span multiple lines of source code and to not interpret escape sequences, such as \n, or Unicode escapes of the form \uXXXX.

The decision not to include the feature as it stands is down to the fact it's not performing well enough, according to an email from Brian Goetz, Java Language Architect at Oracle. He said:

"The Preview Feature mechanism is intended for features for which there is a high confidence that the feature is "done", and the likelihood that significant changes would be made before making the feature permanent is low.  At this time, and after extensive consideration, Jim and I no longer believe this to be the case, and we think letting it preview in its current state would be to the detriment of the language.  We're of course disappointed that this means it will take slightly longer for this feature to make it into the language, but we think that's the best choice."

The email goes on to explain that by withdrawing, the developers can continue to refine the design, explore more options, and aim for a preview that actually meets the requirements of the Preview Feature process.  

 

corretto

 

 

More Information

JDK 12 On OpenJDK

Related Articles

JDK 10 Released

JavaFX Will Be Removed From JDK

Java 9 Finally Appears

JDK 9 Update

Java 9 Slips Again

No Vote For Java Module System

JDK 9 Release Slips Again 

JDK Delivery Date Update

Jigsaw In JDK

 

 

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.

Banner


pgstream - Real Time Change Data Capture For PostgreSQL
16/09/2024

As we've said before, Postgres is for everything, for all the stacks. Now add Change Data Capture to that list too, thanks to pgstream.



JFrog Announces Runtime And GitHub Integration
12/09/2024

JFrog has announced new products and closer integration with GitHub at its annual conference, SwamUp.


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info