咸鱼

咸鱼是以盐腌渍后,晒干的鱼

0%

JDK 19 新特性

2022年07月21 JDK 19 发布Rampdown第二阶段,稳定版计划在2022年09月20日发布。

新特性: http://openjdk.java.net/projects/jdk/19/

JDK 19 is in Rampdown Phase Two. The overall feature set is frozen. No further JEPs will be targeted to this release.

The stabilization repository, jdk19, is open for select bug fixes, with approval, per the JDK Release Process (JEP 3). Late enhancements are still possible, with approval, but the bar is now extraordinarily high.

计划

时间
2022/06/09 Rampdown第一阶段 Rampdown Phase One (fork from main line)
2022/07/21 Rampdown第二阶段 Rampdown Phase Two
2022/08/11 最初的候选版本Initial Release Candidate
2022/08/25 最终的候选版本 Final Release Candidate
2022/09/20 稳定版 General Availability

特性

代号 更新
405: Record Patterns (Preview)
422: Linux/RISC-V Port
424: Foreign Function & Memory API (Preview)
425: Virtual Threads (Preview)
426: Vector API (Fourth Incubator)
427: Pattern Matching for switch (Third Preview)
428: Structured Concurrency (Incubator)

405: 记录模式 (预览版)

Enhance the Java programming language with record patterns to deconstruct record values. Record patterns and type patterns can be nested to enable a powerful, declarative, and composable form of data navigation and processing. This is a preview language feature.

使用 记录模式 增强 Java 编程语言以解构记录值,可以嵌套记录模式和类型模式,实现强大的、声明性的和可组合的数据导航和处理形式。
这是一个预览语言功能。

422: Linux/RISC-V 移植

Port the JDK to Linux/RISC-V.

将 JDK 移植到 Linux/RISC-V

424: 外部函数和内存 API (预览版)

Introduce an API by which Java programs can interoperate with code and data outside of the Java runtime. By efficiently invoking foreign functions (i.e., code outside the JVM), and by safely accessing foreign memory (i.e., memory not managed by the JVM), the API enables Java programs to call native libraries and process native data without the brittleness and danger of JNI. This is a preview API.

引入一个API,Java程序可以与 Java runtime 之外的代码和数据进行互操作。通过有效地调用外部函数(即JVM外的代码),并安全地访问外部内存(即不受JVM管理的内存),该API使Java程序能够调用本机库并处理本机数据,而不会有JNI的脆弱性和危险。这是一个预览API。

425: 虚拟线程(预览版)

Introduce virtual threads to the Java Platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. This is a preview API.

在Java平台中引入虚拟线程 virtual threadsvirtual threads 是轻量级的线程,可以极大地减少编写、维护和观察高吞吐量并发应用程序的工作量。这是一个预览API。

426: Vector API (第四次孵化)

Introduce an API to express vector computations that reliably compile at runtime to optimal vector instructions on supported CPU architectures, thus achieving performance superior to equivalent scalar computations.
引入一个API来表示在运行时可靠地编译到支持的CPU架构上的最优向量指令的向量计算,从而获得优于等效标量计算的性能。

427: Switch 模式匹配(第三预览版)

Enhance the Java programming language with pattern matching for switch expressions and statements. Extending pattern matching to switch allows an expression to be tested against a number of patterns, each with a specific action, so that complex data-oriented queries can be expressed concisely and safely. This is a preview language feature.

使用 switch 表达式和语句的模式匹配增强Java编程语言。扩展模式匹配到switch允许对一个表达式进行多个模式的测试,每个模式都有一个特定的操作,这样就可以简洁而安全地表达复杂的面向数据的查询。
这是一个预览语言特性。

428: 结构化并发(孵化阶段)

Simplify multithreaded programming by introducing an API for structured concurrency. Structured concurrency treats multiple tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability. This is an incubating API.

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