跳到主要内容

JDK 27 新特性概览

JEP 523: Make G1 the Default Garbage Collector in All Environments​

Make the Garbage-First (G1) garbage collector the default collector in all environments, rather than just server environments.

译

JEP 523: 在所有环境中将 G1 设为默认垃圾回收器

使 Garbage-First (G1) 垃圾收集器成为所有环境中的默认收集器,而不仅仅是服务器环境。

JEP 527: Post-Quantum Hybrid Key Exchange for TLS 1.3​

Enhance the security of Java applications that require secure network communication by implementing hybrid key exchange algorithms for TLS 1.3. Such algorithms defend against future quantum computing attacks by combining a quantum-resistant algorithm with a traditional algorithm. Applications that use the javax.net.ssl APIs will benefit from these improved algorithms by default, without change to existing code.

译

JEP 527: 用于 TLS 1.3 的后量子混合密钥交换

通过为 TLS 1.3 实现 混合密钥交换 算法,增强需要安全网络通信的 Java 应用的安全性。此类算法通过将抗量子算法与传统算法相结合,抵御未来的量子计算攻击。使用 javax.net.ssl API 的应用程序将默认受益于这些改进的算法,而无需更改现有代码。

JEP 531: Lazy Constants (Third Preview)​

Introduce an API for lazy constants, which are objects that hold unmodifiable data. Lazy constants are treated as true constants by the JVM, enabling the same performance optimizations that are enabled by declaring a field final. Compared to final fields, however, lazy constants offer greater flexibility as to the timing of their initialization. This is a preview API.

译

JEP 531:惰性常量(第三次预览)

引入一个用于 惰性常量 的 API,惰性常量是持有不可修改数据的对象。JVM 将惰性常量视为真正的常量,从而启用与将字段声明为 final 所启用的相同性能优化。然而,与 final 字段相比,惰性常量在其初始化时机方面提供了更大的灵活性。这是一个 预览 API。

JEP 532: Primitive Types in Patterns, instanceof, and switch (Fifth Preview)​

Enhance pattern matching by allowing primitive types in all pattern contexts, and extend instanceof and switch to work with all primitive types. This is a preview language feature.

译

JEP 532: 模式、instanceof 和 switch 中的基本类型(第五次预览)

通过允许在所有模式上下文中使用基本类型来增强模式匹配,并扩展 instanceof 和 switch 以支持所有基本类型。这是一个预览语言功能。

JEP 533: Structured Concurrency (Seventh Preview)​

Simplify concurrent programming by introducing an API for structured concurrency. Structured concurrency treats groups of related tasks running in different threads as single units of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability. This is a preview API.

译

JEP 533: 结构化并发(第七次预览)

通过为 结构化并发 引入 API,简化并发编程。结构化并发将运行在不同线程中的相关任务组视为单个工作单元,从而简化错误处理和取消,提高可靠性并增强可观测性。这是一个 预览 API。

JEP 534: Compact Object Headers by Default​

Make compact object headers the default object header layout in the HotSpot JVM. Compact object headers reduce object headers from 96 bits down to 64 bits on 64-bit architectures, thereby reducing heap size, improving deployment density, and increasing data locality.

译

JEP 534: 默认启用紧凑对象头

将紧凑对象头设为 HotSpot JVM 中的默认对象头布局。紧凑对象头在 64 位架构上将对象头从 96 位减少到 64 位,从而减小堆大小、提高部署密度并增加数据局部性。

JEP 536: JFR In-Process Data Redaction​

Enhance JDK Flight Recorder (JFR) to redact command-line arguments and the initial values of environment variables and system properties in recordings. Redact this data before it leaves the process, so that sensitive information does not leak.

译

JEP 536: JFR 进程内数据脱敏

增强 JDK Flight Recorder(JFR),以在录制中隐去命令行参数以及环境变量和系统属性的初始值。在数据离开进程之前隐去这些数据,以免敏感信息泄露。

JEP 537: Vector API (Twelfth Incubator)​

Introduce an API to express vector computations that reliably compile at run time to optimal vector instructions on supported CPUs, thus achieving performance superior to equivalent scalar computations. This is an incubating API.

译

JEP 537: 向量 API(第十二轮孵化器)

引入一个 API,用于表达向量计算,这些计算可在支持的 CPU 上于运行时可靠地编译为最优向量指令,从而实现优于等效标量计算的性能。这是一个 孵化中的 API。

JEP 538: PEM Encodings of Cryptographic Objects (Third Preview)​

Introduce an API for encoding objects that represent cryptographic keys, certificates, and certificate revocation lists into the widely-used Privacy-Enhanced Mail (PEM) transport format, and for decoding from that format back into objects. This is a preview API.

译

JEP 538: 密码学对象的 PEM 编码(第三次预览)

引入一个 API,用于将表示加密密钥、证书和证书吊销列表的对象编码为广泛使用的 Privacy-Enhanced Mail (PEM) 传输格式,并用于从该格式解码回对象。这是一个 预览 API。