v30.0
版本发布时间: 2020-10-17 05:49:48
google/guava最新发布版本:v33.3.1(2024-09-24 04:55:13)
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.0-jre</version>
<!-- or, for Android: -->
<version>30.0-android</version>
</dependency>
Javadoc
JDiff
Changelog
-
Guava types can no longer be sent over GWT-RPC. Even the earlier, temporary way to reenable support (
guava.gwt.emergency_reenable_rpc
) no longer has an effect. (0cb89dd110) -
cache
: Fixed memory leak inLocalCache
under j2objc. (5e519d91d0) -
collect
: Added two-elementmin
andmax
methods toComparators
. (958186c071) -
collect
: Removed@Beta
fromMultimaps.toMultimap
. (b6b4dc49b1) -
collect
: Made the set returned byImmutableMap<K, V>.keySet()
serializable as long asK
is serializable, even ifV
is not (and similarly forvalues()
). (f5a69c33fc) -
collect
: Fixed bug inpowerSet.equals(otherPowerSet)
would erroneously returnfalse
if the two power sets' underlying sets were equal but had a different iteration order. (215b1f0dd7) -
collect
: Eliminated j2objc retain-cycle inSingletonImmutableBiMap
. (0ad38b88bd) -
eventbus
: Prevented@Subscribe
from being applied to a method that takes a primitive, as that will never be called. (554546c971) -
graph
: MadeTraverser.breadthFirst()
lazier, and optimizedTraverser
more generally. (32f2d770f7, b5210ca95c) -
graph
: Added@DoNotMock
toTraverser
. (6410f18c06) -
io
: DeprecatedFiles.createTempDir()
. (fec0dbc463) (CVE-2020-8908; continuing discussion in https://github.com/google/guava/issues/4011) -
[update: My mistake: This was rolled back, so it did not make 30.0.]io
: UpgradedByteStreams.copy(InputStream, OutputStream)
to use the fasterFileChannel
if possible. (a1e9a0bd12) -
math
: AddedroundToDouble
toBigDecimalMath
,BigIntegerMath
, andLongMath
. (bee4f3c7ed, 2b5c096ddf, 633abf2c62) -
net
: AddedMediaType
constants for several font/ types. (571cf66bac) -
net
: AddedHttpHeaders
constants forCross-Origin-Embedder-Policy(-Report-Only)?
. (c3bf73187a) -
testing
: MadeEqualsTester
test that non-String
objects are not equal to theirString
representations. (c9570eae69) -
util.concurrent
: AddedClosingFuture
. (52e048ed6c) -
util.concurrent
: Removed the deprecated 1-argServiceManager.addListener(Listener)
. Use the 2-argaddListener(Listener, Executor)
overload, setting the executor todirectExecutor()
for equivalent behavior. (dfb0001714) -
util.concurrent
: ChangedAbstractFuture.toString()
to no longer include thetoString()
of the result. (2ebf27fd45) -
util.concurrent
: AddedawaitTerminationUninterruptibly
. (f07b9540dc)