Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Eclipse Temurin features

download PDF

Eclipse Temurin does not contain structural changes from the upstream distribution of OpenJDK.

For the list of changes and security fixes that the latest OpenJDK 21 release of Eclipse Temurin includes, see OpenJDK 21.0.3 Released.

New features and enhancements

Review the following release notes to understand new features and feature enhancements included with the Eclipse Temurin 21.0.3 release:

Java compiler aligns with the Java Language Specification by rejecting the final keyword in record patterns

The Java 21 release enhanced the Java language with pattern matching for switch statements. However, OpenJDK 21 provides a javac compiler that allows use of the final keyword before a record pattern (for example, case final R(…​) ->). This use of the final keyword violates the Java Language Specification.

In OpenJDK 21.0.3, the javac compiler is aligned with the Java Language Specification. This enhancement means that any program that includes the final keyword in a switch statement now fails to compile. In this situation, to ensure that the program compiles successfully, you must remove the final keyword.

See JDK-8317300 (JDK Bug System).

XML Security for Java updated to Apache Santuario 3.0.3

In OpenJDK 21.0.3, the XML signature implementation is based on Apache Santuario 3.0.3.

This enhancement introduces the following four SHA-3-based RSA-MGF1 SignatureMethod algorithms:

  • SHA3_224_RSA_MGF1
  • SHA3_256_RSA_MGF1
  • SHA3_384_RSA_MGF1
  • SHA3_512_RSA_MGF1

Because the javax.xml.crypto.dsig.SignatureMethod API cannot be modified in update releases to provide constant values for the new algorithms, use the following equivalent string literal values for these algorithms:

  • http://www.w3.org/2007/05/xmldsig-more#sha3-224-rsa-MGF1
  • http://www.w3.org/2007/05/xmldsig-more#sha3-256-rsa-MGF1
  • http://www.w3.org/2007/05/xmldsig-more#sha3-384-rsa-MGF1
  • http://www.w3.org/2007/05/xmldsig-more#sha3-512-rsa-MGF1

See JDK-8319124 (JDK Bug System).

TrimNativeHeapInterval option available as a product switch

OpenJDK 21.0.3 provides the -XX:TrimNativeHeapInterval=ms option as an official product switch. This enhancement enables the JVM to trim the native heap at specified intervals (in milliseconds) on supported platforms. Currently, the only supported platform for this enhancement is Linux with glibc.

You can disable trimming by setting TrimNativeHeapInterval=0. The trimming feature is disabled by default.

See JDK-8325496 (JDK Bug System).

SystemTray.isSupported() method returns false on most Linux desktops

In OpenJDK 21.0.3, the java.awt.SystemTray.isSupported() method returns false on systems that do not support the SystemTray API correctly. This enhancement is in accordance with the SystemTray API specification.

The SystemTray API is used to interact with the taskbar in the system desktop to provide notifications. SystemTray might also include an icon representing an application. Due to an underlying platform issue, GNOME desktop support for taskbar icons has not worked correctly for several years. This platform issue affects the JDK’s ability to provide SystemTray support on GNOME desktops. This issue typically affects systems that use GNOME Shell 44 or earlier.

Note

Because the lack of correct SystemTray support is a long-standing issue on some systems, this API enhancement to return false on affected systems is likely to have a minimal impact on users.

See JDK-8322750 (JDK Bug System).

Certainly R1 and E1 root certificates added

In OpenJDK 21.0.3, the cacerts truststore includes two Certainly root certificates:

Certificate 1
  • Name: Certainly
  • Alias name: certainlyrootr1
  • Distinguished name: CN=Certainly Root R1, O=Certainly, C=US
Certificate 2
  • Name: Certainly
  • Alias name: certainlyroote1
  • Distinguished name: CN=Certainly Root E1, O=Certainly, C=US

See JDK-8321408 (JDK Bug System).

Precise parallel scanning of large object arrays for young collection roots

During the collection of young generation objects, the Parallel Garbage Collector (GC) partitions old generation objects into 64 kB stripes to scan for references to the young generation. These stripes are assigned to worker threads to perform scanning in parallel.

Previous releases of OpenJDK 21 did not constrain the worker threads to their own stripe. This lack of constraint imposed limits on parallelism. For example, if a large object started in a stripe that was allocated to a specific worker thread, this thread could end up scanning an object with thousands of references across multiple stripes.

OpenJDK 21.0.3 constrains each worker thread to its allocated stripe. Each thread now processes only the interesting parts of large object arrays. When large object arrays are present, pauses for the Parallel GC are now similar to pauses for the Garbage-First (G1) collector. In some cases, this enhancement helps to reduce the length of pauses by 75–80%. For example, a 100-millisecond pause in earlier releases could be reduced to a 20-millisecond pause in this release.

See JDK-8310031 (JDK Bug System).

Fixed potential JVM failures when using ZGC and a non-default ObjectAlignmentInBytes value

In earlier releases of OpenJDK 21, if you ran the JVM with the -XX:+UseZGC option and a non-default value for -XX:ObjectAlignmentInBytes, the JVM could fail or malfunction. This issue occurred because ZBarrierSet::clone_obj_array ignored padding at the end of an object array.

OpenJDK 21.0.3 resolves this issue to ensure that you can successfully run the JVM when using the Z Garbage Collector (ZGC) and non-default values for Java object alignment when running the JVM.

See JDK-8325074 (JDK Bug System).

Revised on 2024-05-09 14:52:17 UTC

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.