Repository navigation
Releases
Releases · google/guava
30.1.1
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<!-- or, for Android: -->
<version>30.1.1-android</version>
</dependency>Jar files
Guava requires one runtime dependency, which you can download here:
Javadoc
JDiff
Changelog
- Increased the aggressiveness of Guava 30.1's warning log message for running
guava-androidunder a Java 7 VM. (Android VMs are unaffected.) If the warning itself causes you trouble, you can eliminate it by silencing the logger forcom.google.common.base.Preconditions(which is used only for this warning). This warning prepares for removing support for Java 7 in 2021. Please report any problems. We have tried to make the warning as safe as possible, but anytime a common library logs, especially as aggressively as we do in this new release, there is the potential forNullPointerExceptionor even deadlock. (To be clear, Guava will not log under Java 8 or Android, but it will under Java 7.) (00c25e9) cache: Fixed compatibility betweenasMap().compute(...)and a load. (42bf4f4)cache: Added@CheckReturnValueto some APIs. (a5ef129)collect: Added@DoNotCallto the mutator methods on immutable types (6ae9532)hash: Removed@BetafromHashCode. (2c9f161)io: Removed@BetafromCountingOutputStream. (d394bac)
30.1
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1-jre</version>
<!-- or, for Android: -->
<version>30.1-android</version>
</dependency>Javadoc
JDiff
Changelog
- If you use guava-android in an Android project (as opposed to from a Java VM), you will need to enable desugaring of Java 8 language features if you have not already done so. (And if you are releasing an Android library, then anyone who uses that library will also have to enable desugaring.) We expect for nearly all Android projects to have already enabled desugaring. But if this causes problems for you, please let us know on issue #5358. The purpose of this change is to detect potential problems for users now so that we can plan to use Java 8 language features in our implementation later this year.
- Introduced a warning log message when running
guava-androidunder a Java 7 VM. (Android VMs are unaffected, aside from the need to use desugaring, described in the previous bullet.) This warning is not guaranteed to be logged when running under Java 7, so please don't rely on it as your only warning about future problems. If the warning itself causes you trouble, you can eliminate it by silencing the logger forcom.google.common.base.MoreObjects$ToStringHelper(which is used only for this warning). This warning prepares for removing support for Java 7 in 2021. Please report any problems. We have tried to make the warning as safe as possible, but anytime a common library logs, there is the potential forNullPointerExceptionor even deadlock. (To be clear, Guava will not log under Java 8 or Android, but it may log under Java 7.) (dc52e6e)- Note that we subsequently made this warning more aggressive in Guava 30.1.1, including changing the logger it uses to
com.google.common.base.Preconditions.
- Note that we subsequently made this warning more aggressive in Guava 30.1.1, including changing the logger it uses to
base: DeprecatedStandardSystemProperty.JAVA_EXT_DIRS. We do not plan to remove the API, but note that, under recent versions of Java, that property always has a value ofnull. (38abf07)net: AddedHttpHeadersconstants forOrigin-IsolationandX-Request-ID. (a48fb4f, 8319d20)reflect: AddedClassInfo.isTopLevel(). (4106272)util.concurrent: AddedClosingFuture.submitAsync(AsyncClosingCallable). (c5e2d8d)
30.0
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. (0cb89dd) cache: Fixed memory leak inLocalCacheunder j2objc. (5e519d9)collect: Added two-elementminandmaxmethods toComparators. (958186c)collect: Removed@BetafromMultimaps.toMultimap. (b6b4dc4)collect: Made the set returned byImmutableMap<K, V>.keySet()serializable as long asKis serializable, even ifVis not (and similarly forvalues()). (f5a69c3)collect: Fixed bug inpowerSet.equals(otherPowerSet)would erroneously returnfalseif the two power sets' underlying sets were equal but had a different iteration order. (215b1f0)collect: Eliminated j2objc retain-cycle inSingletonImmutableBiMap. (0ad38b8)eventbus: Prevented@Subscribefrom being applied to a method that takes a primitive, as that will never be called. (554546c)graph: MadeTraverser.breadthFirst()lazier, and optimizedTraversermore generally. (32f2d77, b5210ca)graph: Added@DoNotMocktoTraverser. (6410f18)io: DeprecatedFiles.createTempDir(). (fec0dbc) (CVE-2020-8908; continuing discussion in #4011)[update: My mistake: This was rolled back, so it did not make 30.0.]io: UpgradedByteStreams.copy(InputStream, OutputStream)to use the fasterFileChannelif possible. (a1e9a0b)math: AddedroundToDoubletoBigDecimalMath,BigIntegerMath, andLongMath. (bee4f3c, 2b5c096, 633abf2)net: AddedMediaTypeconstants for several font/ types. (571cf66)net: AddedHttpHeadersconstants forCross-Origin-Embedder-Policy(-Report-Only)?. (c3bf731)testing: MadeEqualsTestertest that non-Stringobjects are not equal to theirStringrepresentations. (c9570ea)util.concurrent: AddedClosingFuture. (52e048e)util.concurrent: Removed the deprecated 1-argServiceManager.addListener(Listener). Use the 2-argaddListener(Listener, Executor)overload, setting the executor todirectExecutor()for equivalent behavior. (dfb0001)util.concurrent: ChangedAbstractFuture.toString()to no longer include thetoString()of the result. (2ebf27f)util.concurrent: AddedawaitTerminationUninterruptibly. (f07b954)
29.0
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
<!-- or, for Android: -->
<version>29.0-android</version>
</dependency>Javadoc
JDiff
Changelog
- Guava types can no longer be sent over GWT-RPC. To temporarily reenable support, set the
guava.gwt.emergency_reenable_rpcsystem property totrue. (5214a10)- This is the only breaking change in this release, and it affects only users of the
guava-gwtartifact, not people who use only theguavaartifact. This release contains no changes that break binary compatibility for any users.
- This is the only breaking change in this release, and it affects only users of the
- API documentation for Guava classes is now easier to reach. For example, for
ImmutableList, visit guava.dev/ImmutableList. Also, more easily access the index at guava.dev/api. collect: AnnotatedFluentIterable.from(FluentIterable)with@DoNotCall. (b1c77b7)collect: Madeceiling,floor,headSet(E, boolean), andtailSet(E, boolean)methods available in the GWT-emulatedImmutableSortedSet. (7e0fe90, 5f2fbf2)graph: Made it possible to set a stable incident edge order by calling the newly added method[Value]Graph.Builder.incidentEdgeOrder(ElementOrder.stable()). (7016402)graph: AddedincidentEdgeOrder()to the[Value]Graphinterfaces. (cde576e)util.concurrent: AddedDuration-baseddefaultmethods toListeningScheduledExecutorService. (931e83f)util.concurrent: AddedimmediateVoidFuture. (9f3bae5)util.concurrent: Removed@BetafromServiceand related classes. (dc46627)util.concurrent: Deprecated the 1-arg overload ofServiceManager.addListener. (86e3620)util.concurrent: Changed the return type ofServiceManager.servicesByState()toImmutableSetMultimap(but also retained a method with the old signature for binary compatibility). (31999ae)util.concurrent: Made it safe to load theAbstractFutureclass from aForkJoinPoolthread under a security manager. (6e0c5b5)
28.2
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.2-jre</version>
<!-- or, for Android: -->
<version>28.2-android</version>
</dependency>Javadoc
JDiff
Changelog
- Warning to users of GWT-RPC: The first Guava release of 2020 will remove support for GWT-serializing Guava types. To test ahead of time with GWT-RPC support for Guava types disabled, set the
guava.gwt.emergency_reenable_rpcsystem property tofalse. (Even without the system property enabled, apps will now log warnings when sending Guava types over GWT-RPC.) (08bbf53) base: AddedSplitter.splitToStream().concurrent: AddedFutures.submit()(c7ef0cc)concurrent: MadeplatformThreadFactory()and related utilities (mainly*Service) work under Java 11 App Engine, and tweaked other App Engine threading behavior. (e3ee00d)concurrent: AddedcatchtoStackOverflowErrorinAbstractFuture.toStringto prevent long chains of futures from failingtoStringcalls. (a2e6acc)concurrent: MadeListenableFutureimplementThenablevia a default interface method in GWT/j2cl (e0bac74).graph: Fixed bug inAbstractNetwork.hasEdgeConnecting()causing it to throw if either endpoint was not in the graph. Originally reported as #3721. (2ee7f9d)graph: Fixed data race. (0e94fb5)math: AddedStreamsupport toStatsandStatsAccumulator. (e2f4eba)math: AddedQuantilescompute()methods which return aMapnow return a map with entries in the same order in which the indexes were provided. (786c3d8)net: Added support for scope IDs for IPv6 addresses. (8a7d36a)net: AddedtoBigIntegerandfromIpv4BigInteger/fromIpv6BigIntegertoInetAddressesfor manipulatingInetAddressesasBigIntegers(d7a0b3d)net: AddedMediaTypeconstants for application/opensearchdescription+xml (f79c4fe) and MPEG-DASH (67dd062), as well as a constant for the header Cross-Origin-Opener-Policy (4ef2111).net: MadeMediaTypereject empty type, subtype, and attribute (b080067) and non-ASCII parameter values (2278123). Also, made it serialize empty parameter values to quoted strings (2278123).- Added
@DoNotMockto several types. (4eea0f7, add4309) - Removed dependency on
animal-sniffer-annotations. (5f37e53)
28.1
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.1-jre</version>
<!-- or, for Android: -->
<version>28.1-android</version>
</dependency>Javadoc
JDiff
Changelog
collect: AddedRangeMap.merge, analogous toMap.merge. (687252d)collect: Fixed a bug inImmutableSet.Builderthat could lead to infinite loops when building multiple sets from the same builder. (0007cb2)io: Fixed an issue where theInputStreamreturned byBaseEncoding.decodingStream(Reader)could fail to throwDecodingExceptionwhile decoding an invalid string. (ddd4a49)net: AddedMediaTypefor "image/heif" and "image/jp2" (508696a)net: AddedUpgrade-Insecure-Requestsheader toHttpHeaders. (6a8b716)concurrent: Fixed potential memory leak inFutures.whenAllSucceed/whenAllComplete(494834b)
28.0
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.0-jre</version>
<!-- or, for Android: -->
<version>28.0-android</version>
</dependency>Javadoc
JDiff
Changelog
collect: AddedDuration-based overloads to someQueuesmethods. (21d06cf)net: AddedMediaTypefor "application/geo+json". (36cd5cf)net: Added a number of constants toHttpHeaders.concurrent: Removed deprecatedCheckedFutureand related utilities. (3dd22fe)concurrent: AddedDuration-based overloads to many methods.concurrent: Removed@BetafromsetFuture. (5ec1360)concurrent: Added deprecatedFluentFuture.from(FluentFuture)to point out redundant code. (f9f2807)graph: AddedGraphBuilder.immutable(),ValueGraphBuilder.immutable()andNetworkBuilder.immutable()for building immutable graphs in a fluent way.- J2ObjC: Fixed crashes from use of
ImmutableMap.entrySet(). (74fc49f)
27.1
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.1-jre</version>
<!-- or, for Android: -->
<version>27.1-android</version>
</dependency>Javadoc
JDiff
Changelog
- Removed GWT emulations that are no longer needed as of GWT 2.8.2. This means that GWT projects that use this version of Guava must use GWT 2.8.2 or higher. (5f35072)
- Created a BOM for Guava (new
guava-bomartifact). (0e59641) - Removed
@Betafrom a number of frequently used APIs. (6242bdd) net: AddedSec-Fetchheaders toHttpHeaders. (673b243)net: AddedSourceMapheader toHttpHeaders(a99c15f)net: AddedMediaTypefor "application/jose" and "application/jose+json". (d416e04)graph: Added overloads to methods accepting pairs of nodes to also acceptEndpointPair; changed behavior of*Graph.edges().contains()to allow undirected graphs to accept orderedEndpointPairs. (af3ee1c)
27.0.1
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0.1-jre</version>
<!-- or, for Android: -->
<version>27.0.1-android</version>
</dependency>Javadoc
JDiff
Changelog
27.0
Maven
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0-jre</version>
<!-- or, for Android: -->
<version>27.0-android</version>
</dependency>Javadoc
JDiff
Changelog
Important: ListenableFuture is now available as a separate artifact (com.google.guava:listenablefuture:1.0) from the rest of Guava. As part of that change, Guava now has a real (needed at runtime) dependency on com.google.guava:failureaccess:1.0. For more details, see this announcement. (b62d529)
collect: Added agap(Range)method toRangethat computes theRangethat lies between them. (a9dd709)net: AddedHttpHeaders.EARLY_DATA. (e074cf1)net: AddedMediaType.WASM_APPLICATION. (0b3eb0f)concurrent:AbstractFuturedoesn't exposeFluentFutureAPIs anymore. (0f8d360)concurrent: AddeddoCancelStartprotected method toAbstractService(27bfe41)