MyGit

v31.0

google/guava

版本发布时间: 2021-09-25 05:36:10

google/guava最新发布版本:v33.3.1(2024-09-24 04:55:13)

Maven

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>31.0-jre</version>
  <!-- or, for Android: -->
  <version>31.0-android</version>
</dependency>

Jar files

Guava requires one runtime dependency, which you can download here:

Javadoc

JDiff

Changelog

Known issue (fixed in patch release 31.0.1): guava<I>-gwt breaks GWT compilation

Other Guava artifacts aren't affected, only users of GWT. (If you are using GWT, you would know it.)

Sorry for missing this during release: It was a known issue, and we had a partial workaround in place, but I forgot to include the problem in the list of release blockers.

To pick up the fix, upgrade to 31.0.1.

Main changes

Nullness annotations

Previously, we annotated all parameters that could be null, and we did not annotate elsewhere reliably. Now:

(Known issue: We are missing annotations on the TypeToInstanceMap classes. We'll fix this in a future release.)

By providing additional nullness information, this release may result in more errors or warnings from any nullness analyzers you might use. If so, you may need to fix or suppress them as usual. For advice, see the documentation for the analyzer you're using, such as that for the Checker Framework or for Kotlin.

If you use NullAway with the AnnotatedPackages flag set to cover com.google.common, you may see not only additional legitimate errors but also some incorrect errors because Guava no longer uses @Nullable as frequently on type-variable usages. The NullAway developers have suggested a workaround, and they are planning for NullAway 0.9.9 to treat our type-variable usages differently. However, even after 0.9.9, NullAway users are likely to see some incorrect errors if they keep com.google.common in their AnnotatedPackages. A fuller solution will require Guava and tools to adopt an annotation model that is more suited to generics. For updates on that, follow https://github.com/google/guava/issues/2960.

We will be using more annotations to provide more nullness information in the future.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2021-09-25发行的版本