Java 13 предстои да се появи на Java SE Platform, което означава, че цялостният набор от функции е замразен и няма допълнителни предложения за повишаване на JDK (JEPs) за тази версия. Java 11 е последният LTS ъпдейт, а тринадесетката е с няколко оправени бъгове.
Финалният лист с функциите включва:
- Dynamic CDS Archives (JEP 350):
Introduced in JDK 5, class-data sharing (CDS) allows a set of classes to be pre-processed into a shared archive file that can be memory-mapped at runtime to reduce startup time. It can also reduce dynamic memory footprint when multiple JVMs share the same archive file. This feature extends application class-data sharing to allow the dynamic archiving of classes at the end of Java application execution. The archived classes will include all loaded application classes and library classes that are not present in the default, base-layer CDS archive.
- ZGC: Uncommit Unused Memory (JEP 351):
This JEP will enable the Z Garbage Collector (ZGC) to return unused heap memory to the operating system. Other GCs in HotSpot, such as G1 and Shenandoah, already provide this capability. But it’s increasingly needed in things like container environments, where resources are paid by use; environments where an application might be idle for long periods of time and is sharing or competing for resources with many other applications; and among apps that have very different heap space requirements during its execution.
- Reimplement the Legacy Socket API (JEP 353):
This JEP replaces the underlying implementation used by the java.net.Socket and java.net.ServerSocket APIs with a simpler and more modern implementation that is easy to maintain and debug. The new implementation is designed to be easy to adapt to work with user-mode threads, a.k.a. fibers, currently being explored in Project Loom.
- Switch Expressions (Preview) (JEP 354):
This preview language feature, which extends the switch statement so that it can be used as a statement or an expression, and both forms can use a „traditional“ or „simplified“ scoping and control flow behavior, was originally proposed in 2017 and offered as a preview feature in Java 12 (JEP 325). This JEP makes one change: to yield a value from a switch expression, the break with value statement is dropped in favor of a yield statement.
- Text Blocks (Preview) (JEP 355):
Another preview language feature, this JEP is „a follow-on effort to explorations begun in JEP 326 (Raw String Literals), which was pulled back from the Java 12 release. Raw string literals can span multiple lines of source code and do not interpret escape sequences. JEP 355 proposes adding text blocks to the Java language. A text block is a multi-line string literal that avoids the need for most escape sequences, automatically formats the string in a predictable way, and gives the developer control over format when desired.
Следващият голям LTS ъпдейт ще бъде Java 17, който ще получим през септември 2021 г., според календара на Oracle. JDK 13 се очаква през юли, но финалната версия е насрочена за 17-ти септември тази година.