Blame SOURCES/NEWS

cadfac
Key:
cadfac
cadfac
JDK-X  - https://bugs.openjdk.java.net/browse/JDK-X
cadfac
CVE-XXXX-YYYY: https://cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
cadfac
033d8e
New in release OpenJDK 17.0.0 (2021-09-14):
cadfac
===========================================
033d8e
The full list of changes in the interim releases from 11u to 17u can be found at:
033d8e
  * https://builds.shipilev.net/backports-monitor/release-notes-12.txt
033d8e
  * https://builds.shipilev.net/backports-monitor/release-notes-13.txt
033d8e
  * https://builds.shipilev.net/backports-monitor/release-notes-14.txt
033d8e
  * https://builds.shipilev.net/backports-monitor/release-notes-15.txt
033d8e
  * https://builds.shipilev.net/backports-monitor/release-notes-16.txt
033d8e
  * https://builds.shipilev.net/backports-monitor/release-notes-17.txt
033d8e
033d8e
Major changes are listed below.  Some changes may have been backported
033d8e
to earlier releases following their first appearance in OpenJDK 12
033d8e
through to 17.
033d8e
033d8e
NEW FEATURES
033d8e
============
033d8e
033d8e
Language Features
033d8e
=================
033d8e
033d8e
Switch Expressions
033d8e
==================
033d8e
https://openjdk.java.net/jeps/325
033d8e
https://openjdk.java.net/jeps/354
033d8e
https://openjdk.java.net/jeps/361
033d8e
033d8e
Extend the `switch` statement so that it can be used as either a
033d8e
statement or an expression, and that both forms can use either a
033d8e
"traditional" or "simplified" scoping and control flow behavior.  Both
033d8e
forms can use either traditional `case ... :` labels (with fall
033d8e
through) or new `case ... ->` labels (with no fall through), with a
033d8e
further new statement for yielding a value from a `switch`
033d8e
expression. These changes will simplify everyday coding, and also
033d8e
prepare the way for the use of pattern matching in `switch`.
033d8e
033d8e
This was a preview feature (http://openjdk.java.net/jeps/12) in
033d8e
OpenJDK 12 & 13 and became final in OpenJDK 14.
033d8e
033d8e
Text Blocks
033d8e
===========
033d8e
https://openjdk.java.net/jeps/355
033d8e
https://openjdk.java.net/jeps/368
033d8e
https://openjdk.java.net/jeps/378
033d8e
033d8e
Add text blocks to the Java language. A text block is a multi-line
033d8e
string literal that avoids the need for most escape sequences,
033d8e
automatically formats the string in a predictable way, and gives the
033d8e
developer control over format when desired.
033d8e
033d8e
This was a preview feature (http://openjdk.java.net/jeps/12) in
033d8e
OpenJDK 13 & 14 and became final in OpenJDK 15.
033d8e
033d8e
Pattern Matching for instanceof
033d8e
===============================
033d8e
https://openjdk.java.net/jeps/305
033d8e
https://openjdk.java.net/jeps/375
033d8e
https://openjdk.java.net/jeps/394
033d8e
http://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html
033d8e
033d8e
Enhance the Java programming language with pattern matching for the
033d8e
`instanceof` operator. Pattern matching allows common logic in a
033d8e
program, namely the conditional extraction of components from objects,
033d8e
to be expressed more concisely and safely.
033d8e
033d8e
This was a preview feature (http://openjdk.java.net/jeps/12) in
033d8e
OpenJDK 14 & 15 and became final in OpenJDK 16.
033d8e
033d8e
Records
033d8e
=======
033d8e
https://openjdk.java.net/jeps/359
033d8e
https://openjdk.java.net/jeps/384
033d8e
https://openjdk.java.net/jeps/395
033d8e
033d8e
Enhance the Java programming language with records.  Records provide a
033d8e
compact syntax for declaring classes which are transparent holders for
033d8e
shallowly immutable data.
033d8e
033d8e
This was a preview feature (http://openjdk.java.net/jeps/12) in
033d8e
OpenJDK 14 & 15 and became final in OpenJDK 16.
033d8e
033d8e
Sealed Classes
033d8e
==============
033d8e
https://openjdk.java.net/jeps/360
033d8e
https://openjdk.java.net/jeps/397
033d8e
https://openjdk.java.net/jeps/409
033d8e
https://cr.openjdk.java.net/~briangoetz/amber/datum.html
033d8e
033d8e
Enhance the Java programming language with sealed classes and
033d8e
interfaces. Sealed classes and interfaces restrict which other classes
033d8e
or interfaces may extend or implement them.
033d8e
033d8e
This was a preview feature (http://openjdk.java.net/jeps/12) in
033d8e
OpenJDK 15 & 16 and became final in OpenJDK 17.
033d8e
033d8e
Restore Always-Strict Floating-Point Semantics
033d8e
==============================================
033d8e
https://openjdk.java.net/jeps/306
033d8e
033d8e
Make floating-point operations consistently strict, rather than have
033d8e
both strict floating-point semantics (`strictfp`) and subtly different
033d8e
default floating-point semantics. This will restore the original
033d8e
floating-point semantics to the language and VM, matching the
033d8e
semantics before the introduction of strict and default floating-point
033d8e
modes in Java SE 1.2.
033d8e
033d8e
Pattern Matching for switch
cadfac
===========================
033d8e
https://openjdk.java.net/jeps/406
cadfac
033d8e
Enhance the Java programming language with pattern matching for
033d8e
`switch` expressions and statements, along with extensions to the
033d8e
language of patterns. Extending pattern matching to `switch` allows an
033d8e
expression to be tested against a number of patterns, each with a
033d8e
specific action, so that complex data-oriented queries can be
033d8e
expressed concisely and safely.
cadfac
033d8e
This is a preview feature (http://openjdk.java.net/jeps/12) in OpenJDK
033d8e
17.
cadfac
033d8e
Library Features
033d8e
================
cadfac
033d8e
JVM Constants API
033d8e
=================
033d8e
https://openjdk.java.net/jeps/334
033d8e
033d8e
Introduce an API to model nominal descriptions of key class-file and
033d8e
run-time artifacts, in particular constants that are loadable from the
033d8e
constant pool.
033d8e
033d8e
Reimplement the Legacy Socket API
033d8e
=================================
033d8e
https://openjdk.java.net/jeps/353
033d8e
033d8e
Replace the underlying implementation used by the `java.net.Socket`
033d8e
and `java.net.ServerSocket` APIs with a simpler and more modern
033d8e
implementation that is easy to maintain and debug. The new
033d8e
implementation will be easy to adapt to work with user-mode threads,
033d8e
a.k.a. fibers, currently being explored in Project Loom
033d8e
(https://openjdk.java.net/projects/loom).
033d8e
033d8e
JFR Event Streaming
033d8e
===================
033d8e
https://openjdk.java.net/jeps/349
033d8e
033d8e
Expose JDK Flight Recorder data for continuous monitoring.
033d8e
033d8e
Non-Volatile Mapped Byte Buffers
033d8e
================================
033d8e
https://openjdk.java.net/jeps/352
033d8e
033d8e
Add new JDK-specific file mapping modes so that the `FileChannel` API
033d8e
can be used to create `MappedByteBuffer` instances that refer to
033d8e
non-volatile memory.
033d8e
033d8e
Helpful NullPointerExceptions
033d8e
=============================
033d8e
https://openjdk.java.net/jeps/358
033d8e
033d8e
Improve the usability of `NullPointerException`s generated by the JVM
033d8e
by describing precisely which variable was `null`.
033d8e
033d8e
Foreign-Memory Access API
033d8e
=========================
033d8e
https://openjdk.java.net/jeps/370
033d8e
https://openjdk.java.net/jeps/383
033d8e
https://openjdk.java.net/jeps/393
033d8e
033d8e
Introduce an API to allow Java programs to safely and efficiently
033d8e
access foreign memory outside of the Java heap.
033d8e
033d8e
This was a incubation feature (https://openjdk.java.net/jeps/11) in
033d8e
OpenJDK 14, 15 & 16, now superseded by the Foreign Function & Memory
033d8e
API in OpenJDK 17 (see below).
033d8e
033d8e
Edwards-Curve Digital Signature Algorithm (EdDSA)
033d8e
=================================================
033d8e
https://openjdk.java.net/jeps/339
033d8e
033d8e
Implement cryptographic signatures using the Edwards-Curve Digital
033d8e
Signature Algorithm (EdDSA) as described by RFC 8032
033d8e
(https://tools.ietf.org/html/rfc8032).
033d8e
033d8e
Hidden Classes
033d8e
==============
033d8e
https://openjdk.java.net/jeps/371
033d8e
033d8e
Introduce hidden classes, which are classes that cannot be used
033d8e
directly by the bytecode of other classes. Hidden classes are intended
033d8e
for use by frameworks that generate classes at run time and use them
033d8e
indirectly, via reflection. A hidden class may be defined as a member
033d8e
of an access control nest (https://openjdk.java.net/jeps/181), and may
033d8e
be unloaded independently of other classes.
033d8e
033d8e
Reimplement the Legacy DatagramSocket API
033d8e
=========================================
033d8e
https://openjdk.java.net/jeps/373
033d8e
033d8e
Replace the underlying implementations of the
033d8e
`java.net.DatagramSocket` and `java.net.MulticastSocket` APIs with
033d8e
simpler and more modern implementations that are easy to maintain and
033d8e
debug. The new implementations will be easy to adapt to work with
033d8e
virtual threads, currently being explored in Project Loom
033d8e
(https://openjdk.java.net/projects/loom). This is a follow-on to JEP
033d8e
353 (see above), which already reimplemented the legacy Socket API.
033d8e
033d8e
Vector API
033d8e
==========
033d8e
https://openjdk.java.net/jeps/338
033d8e
https://openjdk.java.net/jeps/414
033d8e
033d8e
Provide an initial iteration of an incubator module,
033d8e
`jdk.incubator.vector`, to express vector computations that reliably
033d8e
compile at runtime to optimal vector hardware instructions on
033d8e
supported CPU architectures and thus achieve superior performance to
033d8e
equivalent scalar computations.
033d8e
033d8e
This is an incubation feature (https://openjdk.java.net/jeps/11)
033d8e
introduced in OpenJDK 16.
033d8e
033d8e
Unix-Domain Socket Channels
033d8e
===========================
033d8e
https://openjdk.java.net/jeps/380
033d8e
033d8e
Add Unix-domain (`AF_UNIX`) socket support to the socket channel and
033d8e
server-socket channel APIs in the `java.nio.channels` package. Extend
033d8e
the inherited channel mechanism to support Unix-domain socket channels
033d8e
and server socket channels.
033d8e
033d8e
Foreign Linker API (Incubator)
033d8e
==============================
033d8e
https://openjdk.java.net/jeps/389
033d8e
033d8e
Introduce an API that offers statically-typed, pure-Java access to
033d8e
native code. This API, together with the Foreign-Memory API (see
033d8e
above), will considerably simplify the otherwise error-prone process
033d8e
of binding to a native library.
033d8e
033d8e
This was an incubation feature (https://openjdk.java.net/jeps/11)
033d8e
introduced in OpenJDK 16, now superseded by the Foreign Function &
033d8e
Memory API in OpenJDK 17 (see below).
033d8e
033d8e
Strongly Encapsulate JDK Internals by Default
033d8e
=============================================
033d8e
https://openjdk.java.net/jeps/396
033d8e
https://openjdk.java.net/jeps/403
033d8e
033d8e
Strongly encapsulate all internal elements of the JDK by default,
033d8e
except for critical internal APIs such as `sun.misc.Unsafe`.  It will
033d8e
no longer be possible to relax the strong encapsulation of internal
033d8e
elements via a single command-line option, as was possible in OpenJDK
033d8e
9 through 16.
033d8e
033d8e
Enhanced Pseudo-Random Number Generators
033d8e
========================================
033d8e
https://openjdk.java.net/jeps/356
033d8e
033d8e
Provide new interface types and implementations for pseudo-random
033d8e
number generators (PRNGs), including jumpable PRNGs and an additional
033d8e
class of splittable PRNG algorithms (LXM).
033d8e
033d8e
Foreign Function & Memory API
033d8e
=============================
033d8e
https://openjdk.java.net/jeps/412
033d8e
033d8e
Introduce an API by which Java programs can interoperate with code and
033d8e
data outside of the Java runtime. By efficiently invoking foreign
033d8e
functions (i.e., code outside the JVM), and by safely accessing
033d8e
foreign memory (i.e., memory not managed by the JVM), the API enables
033d8e
Java programs to call native libraries and process native data without
033d8e
the brittleness and danger of JNI.
033d8e
033d8e
This API is an incubation feature (https://openjdk.java.net/jeps/11)
033d8e
introduced in OpenJDK 17, and is an evolution of the Foreign Memory
033d8e
Access API (OpenJDK 14 through 16) and Foreign Linker API (OpenJDK
033d8e
16) (see above).
033d8e
033d8e
Context-Specific Deserialization Filters
033d8e
========================================
033d8e
https://openjdk.java.net/jeps/415
033d8e
033d8e
Allow applications to configure context-specific and
033d8e
dynamically-selected deserialization filters via a JVM-wide filter
033d8e
factory that is invoked to select a filter for each individual
033d8e
deserialization operation.
033d8e
033d8e
Tools
033d8e
=====
033d8e
033d8e
Packaging Tool
033d8e
==============
033d8e
https://openjdk.java.net/jeps/343
033d8e
https://openjdk.java.net/jeps/392
033d8e
033d8e
Provide the `jpackage` tool, for packaging self-contained Java
033d8e
applications.
033d8e
033d8e
JVM Features
033d8e
============
033d8e
033d8e
Shenandoah: A Low-Pause-Time Garbage Collector
033d8e
==============================================
033d8e
https://openjdk.java.net/jeps/189
033d8e
https://openjdk.java.net/jeps/379
033d8e
033d8e
Add a new garbage collection (GC) algorithm named Shenandoah which
033d8e
reduces GC pause times by doing evacuation work concurrently with the
033d8e
running Java threads.  Pause times with Shenandoah are independent of
033d8e
heap size, meaning you will have the same consistent pause times
033d8e
whether your heap is 200 MB or 200 GB.
033d8e
033d8e
Shenandoah has been provided in Red Hat builds of OpenJDK 8 since
033d8e
8u131 in April 2017 and in all 11u builds.
033d8e
033d8e
Upstream, it was introduced in OpenJDK 12 as an experimental feature
033d8e
and became a production feature in OpenJDK 15. It was backported to
033d8e
OpenJDK 11 with the 11.0.9 release in October 2020.
033d8e
033d8e
Abortable Mixed Collections for G1
033d8e
==================================
033d8e
https://openjdk.java.net/jeps/344
033d8e
033d8e
Make G1 mixed collections abortable if they might exceed the pause
033d8e
target.
033d8e
033d8e
Promptly Return Unused Committed Memory from G1
033d8e
===============================================
033d8e
https://openjdk.java.net/jeps/346
033d8e
033d8e
Enhance the G1 garbage collector to automatically return Java heap
033d8e
memory to the operating system when idle.
033d8e
033d8e
Dynamic CDS Archives
033d8e
====================
033d8e
https://openjdk.java.net/jeps/310
033d8e
https://openjdk.java.net/jeps/350
033d8e
033d8e
Extend application class-data sharing to allow the dynamic archiving
033d8e
of classes at the end of Java application execution. The archived
033d8e
classes will include all loaded application classes and library
033d8e
classes that are not present in the default, base-layer CDS archive.
033d8e
033d8e
ZGC: Uncommit Unused Memory (Experimental)
033d8e
==========================================
033d8e
https://openjdk.java.net/jeps/351
033d8e
033d8e
Enhance ZGC to return unused heap memory to the operating system.
033d8e
033d8e
NUMA-Aware Memory Allocation for G1
033d8e
===================================
033d8e
https://openjdk.java.net/jeps/345
033d8e
033d8e
Improve G1 performance on large machines by implementing NUMA-aware
033d8e
memory allocation.
033d8e
033d8e
ZGC on macOS (Experimental)
cadfac
===========================
033d8e
https://openjdk.java.net/jeps/364
033d8e
033d8e
Port the ZGC garbage collector to macOS.
033d8e
033d8e
ZGC on Windows (Experimental)
033d8e
=============================
033d8e
https://openjdk.java.net/jeps/365
033d8e
033d8e
Port the ZGC garbage collector to Windows.
033d8e
033d8e
ZGC: A Scalable Low-Latency Garbage Collector (Production)
033d8e
==========================================================
033d8e
https://openjdk.java.net/jeps/377
033d8e
033d8e
Change the Z Garbage Collector from an experimental feature into a
033d8e
product feature.
033d8e
033d8e
ZGC: Concurrent Thread-Stack Processing
033d8e
=======================================
033d8e
https://openjdk.java.net/jeps/376
033d8e
033d8e
Move ZGC thread-stack processing from safepoints to a concurrent
033d8e
phase.
cadfac
033d8e
Elastic Metaspace
033d8e
=================
033d8e
https://openjdk.java.net/jeps/387
cadfac
033d8e
Return unused HotSpot class-metadata (i.e., metaspace) memory to the
033d8e
operating system more promptly, reduce metaspace footprint, and
033d8e
simplify the metaspace code in order to reduce maintenance costs.
cadfac
033d8e
Ports
033d8e
=====
cadfac
033d8e
Alpine Linux Port
033d8e
=================
033d8e
https://openjdk.java.net/jeps/386
033d8e
033d8e
Port the JDK to Alpine Linux, and to other Linux distributions that
033d8e
use musl as their primary C library, on both the x64 and AArch64
033d8e
architectures,
033d8e
033d8e
Windows/AArch64 Port
033d8e
====================
033d8e
https://openjdk.java.net/jeps/388
033d8e
033d8e
Port the JDK to Windows/AArch64.
033d8e
033d8e
New macOS Rendering Pipeline
033d8e
============================
033d8e
https://openjdk.java.net/jeps/382
033d8e
033d8e
Implement a Java 2D internal rendering pipeline for macOS using the
033d8e
Apple Metal API as alternative to the existing pipeline, which uses
033d8e
the deprecated Apple OpenGL API.
033d8e
033d8e
macOS/AArch64 Port
033d8e
==================
033d8e
https://openjdk.java.net/jeps/391
033d8e
033d8e
Port the JDK to macOS/AArch64.
033d8e
033d8e
DEPRECATIONS
033d8e
============
033d8e
033d8e
Deprecate the ParallelScavenge + SerialOld GC Combination
cadfac
=========================================================
033d8e
https://openjdk.java.net/jeps/366
033d8e
033d8e
Deprecate the combination of the Parallel Scavenge and Serial Old
033d8e
garbage collection algorithms.
033d8e
033d8e
Deprecate and Disable Biased Locking
033d8e
====================================
033d8e
https://openjdk.java.net/jeps/374
033d8e
033d8e
Disable biased locking by default, and deprecate all related
033d8e
command-line options.
033d8e
033d8e
Warnings for Value-Based Classes
033d8e
================================
033d8e
https://openjdk.java.net/jeps/390
033d8e
033d8e
Designate the primitive wrapper classes as value-based and deprecate
033d8e
their constructors for removal, prompting new deprecation
033d8e
warnings. Provide warnings about improper attempts to synchronize on
033d8e
instances of any value-based classes in the Java Platform.
033d8e
033d8e
Deprecate the Applet API for Removal
033d8e
====================================
033d8e
https://openjdk.java.net/jeps/398
033d8e
033d8e
Deprecate the Applet API for removal.  It is essentially irrelevant
033d8e
since all web-browser vendors have either removed support for Java
033d8e
browser plug-ins or announced plans to do so.
033d8e
033d8e
Deprecate the Security Manager for Removal
033d8e
==========================================
033d8e
https://openjdk.java.net/jeps/411
033d8e
033d8e
Deprecate the Security Manager for removal in a future release. The
033d8e
Security Manager dates from Java 1.0. It has not been the primary
033d8e
means of securing client-side Java code for many years, and it has
033d8e
rarely been used to secure server-side code. To move Java forward, we
033d8e
intend to deprecate the Security Manager for removal in concert with
033d8e
the legacy Applet API (see above).  .
033d8e
033d8e
REMOVALS
033d8e
========
033d8e
033d8e
Remove the Concurrent Mark Sweep (CMS) Garbage Collector
033d8e
========================================================
033d8e
https://openjdk.java.net/jeps/363
033d8e
033d8e
Remove the Concurrent Mark Sweep (CMS) garbage collector.
033d8e
033d8e
Remove the Pack200 Tools and API
033d8e
================================
033d8e
https://openjdk.java.net/jeps/336
033d8e
https://openjdk.java.net/jeps/367
033d8e
033d8e
Remove the `pack200` and `unpack200` tools, and the `Pack200` API in
033d8e
the `java.util.jar` package.  These tools and API were deprecated for
033d8e
removal in OpenJDK 11 with the express intent to remove them in a
033d8e
future release.
033d8e
033d8e
Remove the Nashorn JavaScript Engine
033d8e
====================================
033d8e
https://openjdk.java.net/jeps/372
033d8e
033d8e
Remove the Nashorn JavaScript script engine and APIs, and the `jjs`
033d8e
tool. The engine, the APIs, and the tool were deprecated for removal
033d8e
in OpenJDK 11 with the express intent to remove them in a future
033d8e
release.
033d8e
033d8e
Remove the Solaris and SPARC Ports
033d8e
==================================
033d8e
https://openjdk.java.net/jeps/362
033d8e
https://openjdk.java.net/jeps/381
033d8e
033d8e
Remove the source code and build support for the Solaris/SPARC,
033d8e
Solaris/x64, and Linux/SPARC ports.  These ports were deprecated for
033d8e
removal in OpenJDK 14 (JEP 362) and removed in OpenJDK 15 (JEP 381).
033d8e
033d8e
Remove RMI Activation
033d8e
=====================
033d8e
https://openjdk.java.net/jeps/385
033d8e
https://openjdk.java.net/jeps/407
033d8e
https://docs.oracle.com/en/java/javase/14/docs/specs/rmi/activation.html
cadfac
033d8e
Remove the Remote Method Invocation (RMI) Activation mechanism, while
033d8e
preserving the rest of RMI.  RMI Activation is an obsolete part of RMI
033d8e
that has been optional since OpenJDK 8 and was deprecated in OpenJDK
033d8e
15.
cadfac
033d8e
Remove the Experimental AOT and JIT Compiler
033d8e
============================================
033d8e
https://openjdk.java.net/jeps/410
cadfac
033d8e
Remove the experimental Java-based ahead-of-time (AOT) and
033d8e
just-in-time (JIT) compiler.  This compiler has seen little use since
033d8e
its introduction and the effort required to maintain it is
033d8e
significant.  Retain the experimental Java-level JVM compiler
033d8e
interface (JVMCI) so that developers can continue to use
033d8e
externally-built versions of the compiler for JIT compilation.