Java 8 更新 151 还是 152?

标签 java java-8

有两个Java 8 downloads on the Oracle page .

release notes of 152请注意超过 151 的两件事:

  • BigInteger 性能改进
  • 编译器接受在初始化方法之外修改最终字段

后者似乎更像是“这是一个错误,但未在 8 中修复;它将在 Java 9 中修复”的注释。所以这也适用于版本 151,即使它没有被提及。

我不确定前者。为什么不是151?我觉得这很令人沮丧。两个版本没有明确指出哪个是“更好”或大多数开发人员“首选”的版本。

因此我的问题是:在生产中使用 152 还是 151 更好?有什么指标可以或应该用来做决定吗?

最佳答案

一般的想法是

  • 8u151(标签 jdk8u151-b12)是重要补丁更新 (CPU) 版本
  • 8u152(标签 jdk8u152-b16)是补丁集更新 (PSU) 版本

来自官方 Oracle CPU and PSU Releases Explained

Starting with the release of Java SE 7 Update 71 (Java SE 7u71) in October 2014, Oracle will release a Critical Patch Update (CPU) at the same time as a corresponding Patch Set Update (PSU) for Java SE 7.

Which Java version should I choose: the CPU or the PSU? Oracle strongly recommends that all Java SE users upgrade to the latest CPU release available for a release family. Most users should choose the CPU release.

Users should only use the corresponding PSU release if they are being impacted by one of the additional bugs fixed in that version as noted in the release notes.

The subsequent CPU release will contain all of the fixes from the current PSU. For this reason, organizations should test the current PSU in their environment in anticipation of these fixes being included in the next CPU.

What is the difference between a Java CPU and PSU release? Java SE Critical Patch Updates (CPU) contain fixes to security vulnerabilities and critical bug fixes. Oracle strongly recommends that all Java SE users upgrade to the latest CPU releases as they are made available. Java SE CPU releases are odd numbered versions (i.e. 7u71, 7u65 – see more on Java SE version numbering schemes here).

Java SE Patch Set Updates (PSU) contain all of fixes in the corresponding CPU, as well as additional non-critical fixes. Java PSU releases should only be used if you are being impacted by one of the additional bugs fixed in that version. The release notes call out the additional fixes available in Java SE PSU releases.

PSU releases provide organizations and developers with access to non-critical fixes in addition to the critical fixes contained in the corresponding CPU.

还读 What's the difference between odd and even Java updates?


要查找公共(public)错误修复的完整列表,您需要打开发行说明底部的错误修复页面。


因此,PSU (8u152) 中有 238 个错误修复(不仅是 BigInteger 性能改进)。并且很有可能在下一个 CPU 版本中无论如何您都会获得其中的大部分。因此,建议您尽快更新到 8u151 并测试/调整您的代码以与 8u152 进行比较。如果您确实需要一些错误修复,您可以更新到 8u152。

关于Java 8 更新 151 还是 152?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46928088/

相关文章:

java - 线程运行方法内部使用的方法的同步

java - RESTEASY003940 : Unable to instantiate MessageBodyReader [RestEasy 4. 5.0.Final]

java - Hadoop WordCount 示例中的 "Cannot find symbol"错误

java - CORBA 不清楚的东西

java - 使用 Java 8 将 CSV 文件处理为 Map<String,String[]>

performance - Java 8,列表的第一次处理比后续处理慢

java - addListener() 和 addCallback() 与 ListenableFuture 的区别

java - 使用递归在 char[] 中查找特定字符后跟另一个特定字符

java - 如何删除以下代码中的java.util.NoSuchElementException?

Java Optional<T> 问题,我这样做对吗?