Google core libraries for Java

Related tags

java guava
Overview

Guava: Google Core Libraries for Java

Latest release Build Status

Guava is a set of core Java libraries from Google that includes new collection types (such as multimap and multiset), immutable collections, a graph library, and utilities for concurrency, I/O, hashing, caching, primitives, strings, and more! It is widely used on most Java projects within Google, and widely used by many other companies as well.

Guava comes in two flavors.

  • The JRE flavor requires JDK 1.8 or higher.
  • If you need support for JDK 1.7 or Android, use the Android flavor. You can find the Android Guava source in the android directory.

Adding Guava to your build

Guava's Maven group ID is com.google.guava, and its artifact ID is guava. Guava provides two different "flavors": one for use on a (Java 8+) JRE and one for use on Android or Java 7 or by any library that wants to be compatible with either of those. These flavors are specified in the Maven version field as either 30.1.1-jre or 30.1.1-android. For more about depending on Guava, see using Guava in your build.

To add a dependency on Guava using Maven, use the following:

<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>

To add a dependency using Gradle:

dependencies {
  // Pick one:

  // 1. Use Guava in your implementation only:
  implementation("com.google.guava:guava:30.1.1-jre")

  // 2. Use Guava types in your public API:
  api("com.google.guava:guava:30.1.1-jre")

  // 3. Android - Use Guava in your implementation only:
  implementation("com.google.guava:guava:30.1.1-android")

  // 4. Android - Use Guava types in your public API:
  api("com.google.guava:guava:30.1.1-android")
}

For more information on when to use api and when to use implementation, consult the Gradle documentation on API and implementation separation.

Snapshots and Documentation

Snapshots of Guava built from the master branch are available through Maven using version HEAD-jre-SNAPSHOT, or HEAD-android-SNAPSHOT for the Android flavor.

  • Snapshot API Docs: guava
  • Snapshot API Diffs: guava

Learn about Guava

Links

IMPORTANT WARNINGS

  1. APIs marked with the @Beta annotation at the class or method level are subject to change. They can be modified in any way, or even removed, at any time. If your code is a library itself (i.e., it is used on the CLASSPATH of users outside your own control), you should not use beta APIs unless you repackage them. If your code is a library, we strongly recommend using the Guava Beta Checker to ensure that you do not use any @Beta APIs!

  2. APIs without @Beta will remain binary-compatible for the indefinite future. (Previously, we sometimes removed such APIs after a deprecation period. The last release to remove non-@Beta APIs was Guava 21.0.) Even @Deprecated APIs will remain (again, unless they are @Beta). We have no plans to start removing things again, but officially, we're leaving our options open in case of surprises (like, say, a serious security problem).

  3. Guava has one dependency that is needed for linkage at runtime: com.google.guava:failureaccess:1.0.1. It also has some annotation-only dependencies, which we discuss in more detail at that link.

  4. Serialized forms of ALL objects are subject to change unless noted otherwise. Do not persist these and assume they can be read by a future version of the library.

  5. Our classes are not designed to protect against a malicious caller. You should not use them for communication between trusted and untrusted code.

  6. For the mainline flavor, we test the libraries using only OpenJDK 8 and OpenJDK 11 on Linux. Some features, especially in com.google.common.io, may not work correctly in other environments. For the Android flavor, our unit tests also run on API level 15 (Ice Cream Sandwich).

Issues
  • FinalizableReferenceQueue keeps ClassLoaders around.

    FinalizableReferenceQueue keeps ClassLoaders around.

    Original issue created by nairb774 on 2008-07-28 at 05:39 PM


    If the class loader which loaded the google-collections jar is let go (consider redeploying a war to Apache Geronimo) the class loader will not be able to be garbage collected. This is caused by the thread started by FinalizableReferenceQueue never ending. In other words the garbage collection (for the class loader) can only happen when the thread stops. The solution is to stop the thread when there are no more objects on the queue. This will happen eventually if the rest of the app behaves correctly by not placing state outside of its class loader's environment. Attached is a version of the class which I have used to this effect.

    This is also a problem in the OSGi space where every jar gets its own class loader and they can be refreshed easily at runtime to do rolling upgrades/bug fixes.

    package=base status=fixed type=defect 
    opened by gissuebot 110
  • Maps.asMap(Set, Function) -> Map, or Maps.toMap(Iterable, Function) -> ImmutableMap (... or both)

    Maps.asMap(Set, Function) -> Map, or Maps.toMap(Iterable, Function) -> ImmutableMap (... or both)

    Original issue created by sebdotv on 2008-04-02 at 11:03 AM


    This method would create a new hash map, then iterate over keys: apply function to get value, add new entry to the map.

    Map<K, V> fromFunction(Set<K> keys, Function<K, V> function);

    package=collect status=fixed type=addition 
    opened by gissuebot 70
  • Provide custom exception handling in EventBus

    Provide custom exception handling in EventBus

    Original issue created by toellrich on 2011-10-20 at 12:05 PM


    I would love to replace our implementation of a synchronous event bus with the one from Guava. They do pretty much the same thing except for one notable difference: Ours propagates exceptions that happen during event handling since event handling must occur in the same database transaction as the code that raised the event. Is there any chance to make this configurable (flag/subclassing)?

    Cheers Thomas

    package=eventbus status=fixed type=enhancement 
    opened by gissuebot 61
  • guava 14.0.1 cannot be deployed in a JEE7 Container

    guava 14.0.1 cannot be deployed in a JEE7 Container

    Original issue created by AaronJWhiteside on 2013-05-28 at 09:34 PM


    In JEE7 CDI (CDI 2.0) is enabled by default (without a beans.xml needing to be present), with no standardized way of disable it.

    com.google.common.util.concurrent.ServiceManager is annotated with @Singleton and has a constructor...

      @Inject ServiceManager(Set<Service> services) {     this((Iterable<Service>) services);   }

    So any war or ear that contains a guava 14.0.1 jar suffers from CDI seeing this and trying to create the bean but failing and thus failing the entire war from loading.

    This error is from Glassfish 4.0

    [2013-05-23T15:08:35.664-0700] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1369346915664] [levelValue: 1000] [[   Exception while loading the app : CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Set<Service>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)] org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Set<Service>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)]

    The same WAR also fails to deploy on Firefly 8.0 with a similar error.

    Can guava be modified to not use the @Singleton and @Inject annotations?

    package=concurrent status=fixed 
    opened by gissuebot 57
  • Guava for Android and Guava for the JRE need separate Maven namespaces

    Guava for Android and Guava for the JRE need separate Maven namespaces

    Guava for Android is lacking classes that are provided in Guava for the JRE (notably around support for Java 8 in the immutable collections). The two are not interchangeable.

    Maven's dependency resolution looks at group and project IDs, and then attempts to find the most recent version. Because the only difference between the android and JRE versions of guava is the version number, this can result in Java 8 projects getting the Android version of Guava (and, presumably, vice versa).

    For reference, at the time of writing search.maven.org believes the most recent guava release is the one for Android.

    guava-oops

    The correct thing to do is give the Android version a different project ID.

    P1 
    opened by shs96c 54
  • Support for trees and traversals

    Support for trees and traversals

    Original issue created by jvdneste on 2009-05-25 at 02:34 PM


    As a suggestion; I find it quite useful!

    /**  * returns a depth-first iterator for a tree of T  * @param f a function that returns the children of node of the tree  * @param root The root element of the tree  * @return  */ public static <T> Iterable<T> walk(final T root,     final Function<? super T, ? extends Iterable<? extends T>> getChildren) {   final Function<T, Iterable<? extends T>> walkFunc =       new Function<T, Iterable<? extends T>>() {     public Iterable<? extends T> apply(final T from) {       return walk(from, getChildren, this);     }   };   return walk(root, getChildren, walkFunc); }

    private static <T> Iterable<T> walk(final T root,   final Function<? super T, ? extends Iterable<? extends T>> getChildren,     final Function<T, Iterable<? extends T>> walkFunction) {   return Iterables.concat(     Collections.singleton(root),     Iterables.concat(       Iterables.transform(         getChildren.apply(root),         walkFunction))); }

    And a shortcut in case the nodes implement Iterable:

    @SuppressWarnings("unchecked") public static <T extends Iterable<T>> Iterable<T> walk(final T root) {   return walk(root, Functions.identity(), WalkIterableFunction.INSTANCE); }

    @SuppressWarnings("unchecked") private static enum WalkIterableFunction implements Function {   INSTANCE;

      public Object apply(final Object from) {     return walk(from, Functions.identity(), this);   } };

    package=collect status=fixed type=addition 
    opened by gissuebot 51
  • support OSGi manifest entries

    support OSGi manifest entries

    Original issue created by steven.marcus on 2008-05-08 at 11:50 PM


    Please support OSGi manifest entries. This will enable use of the library within OSGi runtimes without requiring post-processing by downloaders.

    status=duplicate 
    opened by gissuebot 47
  • FluentIterable

    FluentIterable

    Original issue created by jonhnnyweslley on 2007-10-22 at 05:12 PM


    Hi,

    Last weekend I thought: "Why not to use functional programming with Java? More precisely using Google Collections!" ...

    Minutes later... Voila!!! I can to write pieces of code as:

    names.select(new Regexp(".*e$")).transform(new GetLength()).select(new OddNumber())

    I wanted to move this code to a fluent interface. Now, I dont need the verbose syntax of the static methods, and, mainly, this code is more easy to read.

    The attached jar file contains the full source code with:

    • FunctionalIterable interface, with all methods documented
    • StandartFunctionalIterable class, the default implementation
    • StandartFunctionalIterableTest class, the show case class

    About Fluente Interface: http://martinfowler.com/bliki/FluentInterface.html http://en.wikipedia.org/wiki/Fluent_interface

    package=collect status=fixed type=enhancement 
    opened by gissuebot 46
  • Add functions to check blank Strings in com.google.common.base.Strings

    Add functions to check blank Strings in com.google.common.base.Strings

    Original issue created by jbaumgarten on 2010-04-24 at 07:25 PM


    Would be useful to have functions to check blank Strings "à la" commons-lang in com.google.common.base.Strings.

    Could be : static public boolean isBlank(final String s) static public boolean isNullOrBlank(@Nullable final String s)

    Could also add : static public @Nullable String blankToNull(@Nullable final String s).

    status=working-as-intended type=enhancement 
    opened by gissuebot 46
  • JDK and Guava TypeVariable implementations are no longer compatible under 1.7.0_51-b13

    JDK and Guava TypeVariable implementations are no longer compatible under 1.7.0_51-b13

    Original issue created by magiciankid on 2014-01-17 at 01:02 AM


    com.google.common.reflect.TypeResolverTest com.google.common.reflect.TypeTokenResolutionTest com.google.common.reflect.TypeTokenTest com.google.common.reflect.TypesTest

    java -version

    java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

    please fix it :)

    package=reflect status=fixed type=defect 
    opened by gissuebot 45
  • Add text to `CompactHashMap` to explain its internal workings in more detail.

    Add text to `CompactHashMap` to explain its internal workings in more detail.

    Add text to CompactHashMap to explain its internal workings in more detail.

    The motivation is that we were recently visiting this class and related classes to improve their nullness annotations, and I as a reviewer found it hard to understand how the various arrays worked.

    RELNOTES=n/a

    cla: yes 
    opened by copybara-service[bot] 0
  • Bump styfle/cancel-workflow-action from 0.9.0 to 0.9.1

    Bump styfle/cancel-workflow-action from 0.9.0 to 0.9.1

    Bumps styfle/cancel-workflow-action from 0.9.0 to 0.9.1.

    Release notes

    Sourced from styfle/cancel-workflow-action's releases.

    0.9.1

    Patches

    • Fix: cancelling jobs from different repos where two branches have the same name: #105
    • Fix: use getBooleanInput instead of getInput: #92
    • Chore: add permissions configuration in the README.md: #96
    • Chore: add prettier config, format file, add lint workflow: #63
    • Chore: create dependabot.yml: #68
    • Bump typescript from 4.1.5 to 4.2.4: #71
    • Bump actions/setup-node requirement to v2.1.5: #69
    • Bump @​vercel/ncc to 0.28.3: #73
    • Bump @​actions/core from 1.2.6 to 1.2.7: #74
    • Bump @​vercel/ncc from 0.28.3 to 0.28.5: #81
    • Bump @​actions/core from 1.2.7 to 1.3.0: #90
    • Bump prettier from 2.2.1 to 2.3.0: #85
    • Bump @​vercel/ncc from 0.28.5 to 0.28.6: #95
    • Bump typescript from 4.2.4 to 4.3.2: #94
    • Bump prettier from 2.3.0 to 2.3.1: #97
    • Bump typescript from 4.3.2 to 4.3.4: #99
    • Bump prettier from 2.3.1 to 2.3.2: #100
    • Bump typescript from 4.3.4 to 4.3.5: #101
    • Bump husky from 6.0.0 to 7.0.0: #102
    • Bump husky from 7.0.0 to 7.0.1: #103

    Credits

    Huge thanks to @​mikehardy, @​MichaelDeBoey, @​Warashi, @​adrienbernede, and @​spaceface777 for helping!

    Commits
    • a40b884 0.9.1
    • a66ae1f fix cancelling jobs from different repos where two branches have the same nam...
    • b54f1a5 Bump husky from 7.0.0 to 7.0.1 (#103)
    • cc6225c Bump husky from 6.0.0 to 7.0.0 (#102)
    • c94109d Bump typescript from 4.3.4 to 4.3.5 (#101)
    • fc3581b Bump prettier from 2.3.1 to 2.3.2 (#100)
    • 6f9f8b4 Bump typescript from 4.3.2 to 4.3.4 (#99)
    • 6135c0f Bump prettier from 2.3.0 to 2.3.1 (#97)
    • 531a036 chore: add permissions configuration in the README.md (#96)
    • 1f10757 Bump typescript from 4.2.4 to 4.3.2 (#94)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    cla: yes dependencies 
    opened by dependabot[bot] 0
  • Fix a bug in hashing strings with non-BMP chars using Murmur3_32.

    Fix a bug in hashing strings with non-BMP chars using Murmur3_32.

    Fix a bug in hashing strings with non-BMP chars using Murmur3_32.

    RELNOTES=n/a

    cla: yes 
    opened by copybara-service[bot] 0
  • Javadoc -link broken due to missing package-list file

    Javadoc -link broken due to missing package-list file

    When building the Javadoc for a pre-Java 11 project that want's to link to Guava's Javadoc, that linking fails.

    E.g., in Maven:

    1 warning
    [WARNING] Javadoc Warnings
    [WARNING] javadoc: warning - Error fetching URL: https://guava.dev/releases/30.0-jre/api/docs/
    

    The cause is that there is no https://guava.dev/releases/30.0-jre/api/docs/package-list, because package-list has been renamed to element-list. This bug is described in more detail here: JDK-8211194.

    Could you add a workaround similar to the one the Gradle project did?

    P4 type=other 
    opened by archiecobbs 1
  • Fix murmur3_32 with UTF-8 encoding for input with non-BMP character

    Fix murmur3_32 with UTF-8 encoding for input with non-BMP character

    Fixes https://github.com/google/guava/issues/5648

    P3 cla: yes package=hash type=defect 
    opened by findepi 5
  • Incorrect hash result from murmur3_32 with String input containing surrogate pairs

    Incorrect hash result from murmur3_32 with String input containing surrogate pairs

    Here is the test program comparing behavior of

    • Guava's Hashing.murmur3_32 with hashBytes(str.getBytes(encoding))
    • Guava's Hashing.murmur3_32 with hashString(str, encoding)
    • Airlift's Murmur3Hash32.hash(str.getBytes(encoding)) (https://github.com/airlift/slice/blob/d3a025291fd8d6a062e44f3823ee49196783ab9c/src/main/java/io/airlift/slice/Murmur3Hash32.java)
    public class Murmur
    {
        public static void main(String[] args)
        {
            for (String string : List.of("plan ascii", "BMP Piękna łąka w 東京都",  "surrogate pair 💰")) {
                for (Charset charset : List.of(StandardCharsets.UTF_16, StandardCharsets.UTF_8)) {
                    int airliftValue = Murmur3Hash32.hash(Slices.wrappedBuffer(string.getBytes(charset)));
                    int guavaValue1 = Hashing.murmur3_32().hashBytes(string.getBytes(charset)).asInt();
                    int guavaValue2 = Hashing.murmur3_32().hashString(string, charset).asInt();
                    System.out.println("airliftValue = " + airliftValue);
                    System.out.println("guavaValue1  = " + guavaValue1);
                    System.out.println("guavaValue2  = " + guavaValue2);
                    System.out.println();
                }
            }
        }
    }
    

    Results when run with Guava 30.1-jre and Airlift Slice 0.40:

    Note that results agree except for the last case. I expect them to agree in all cases, especially between the two Guava alternative API methods.

    string: plan ascii, charset: UTF-16
    airliftValue = -731716445
    guavaValue1  = -731716445
    guavaValue2  = -731716445
    
    string: plan ascii, charset: UTF-8
    airliftValue = -218266838
    guavaValue1  = -218266838
    guavaValue2  = -218266838
    
    string: BMP Piękna łąka w 東京都, charset: UTF-16
    airliftValue = -989030725
    guavaValue1  = -989030725
    guavaValue2  = -989030725
    
    string: BMP Piękna łąka w 東京都, charset: UTF-8
    airliftValue = 103331700
    guavaValue1  = 103331700
    guavaValue2  = 103331700
    
    string: surrogate pair 💰, charset: UTF-16
    airliftValue = 2147098392
    guavaValue1  = 2147098392
    guavaValue2  = 2147098392
    
    string: surrogate pair 💰, charset: UTF-8
    airliftValue = -1114908744
    guavaValue1  = -1114908744
    guavaValue2  = -2027737699
    

    cc @losipiuk @wendigo @alexjo2144

    P4 type=defect 
    opened by findepi 5
  • Halve the memory used by BloomFilter.readFrom()

    Halve the memory used by BloomFilter.readFrom()

    The BloomFilters readFrom method reads into a separately allocated array, then converts (clones) the array into the expected object. The code has been modified to directly read into the final array, not requiring two instances of the array (for a short duration) and the time/cpu used for the copy.

    P4 cla: no package=hash type=enhancement 
    opened by pwr2c 1
  • Link to release (non-snapshot) API documentation from README and wiki

    Link to release (non-snapshot) API documentation from README and wiki

    At https://guava.dev/releases/snapshot-jre/api/docs/ I typed "Parameter" into the search box at the upper right. See screenshot.

    I clicked on the first match, which took me to https://guava.dev/releases/snapshot-jre/api/docs/undefined/com/google/common/reflect/Parameter.html which gave me a 404 error.

    In addition to fixing this problem, I think it would be helpful to users to have a link to the stable (non-snapshot) API documentation, from both the README shown at https://github.com/google/guava and from https://github.com/google/guava/wiki .

    P3 package=general type=documentation 
    opened by mernst 1
  • Once `guava-jre` requires Java *9*, investigate merging the 2

    Once `guava-jre` requires Java *9*, investigate merging the 2 "flavors" into a multi-release jar

    Someday in the distant future, guava-jre will require Java 9.

    (My assumption has usually been that we will skip requiring 9 and wait until we have enough reason to require some even higher version. If so, we can wait for that. But the issue I'm now filing will give us at least a small motivation to pull the trigger on Java 9 rather than wait. Then again, our hand is often forced by the people who depend on us, who may likewise by inclined to wait for a version higher than 9....)

    When that happens, we could consider trying to eliminate the split between guava-android and guava-jre by putting both into a single multi-release jar. This would be workable only if:

    • Android tools reliably look at only the classes in the "root" section of the jar.
    • Non-Android tools reliably look at the classes under META-INF/versions/9.
    • Users can deal with the doubled jar size.
    • The spec for multi-release jars is evolved to eliminate the requirement that "Every version of the library should offer the same API." (For all I know, this may have happened already. But I suspect not.)
    • Probably various other things happen. But I'm already feeling that this is a pipe dream :)
    P4 package=general type=other 
    opened by cpovirk 0
  • Remove @Beta from com.google.common.util.concurrent.RateLimiter

    Remove @Beta from com.google.common.util.concurrent.RateLimiter

    RateLimiter has been around since version 13 and it is stilled marked as @Beta

    P3 package=concurrent status=triaged type=debeta 
    opened by zaragozamartin91 3
Releases(v30.1.1)
  • v30.1.1(Mar 19, 2021)

    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-android under a Java 7 VM. (Android VMs are unaffected.) If the warning itself causes you trouble, you can eliminate it by silencing the logger for com.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 for NullPointerException or even deadlock. (To be clear, Guava will not log under Java 8 or Android, but it will under Java 7.) (00c25e9b11)
    • cache: Fixed compatibility between asMap().compute(...) and a load. (42bf4f4eb7)
    • cache: Added @CheckReturnValue to some APIs. (a5ef129ffc)
    • collect: Added @DoNotCall to the mutator methods on immutable types (6ae9532d11)
    • hash: Removed @Beta from HashCode. (2c9f161e10)
    • io: Removed @Beta from CountingOutputStream. (d394bac847)
    Source code(tar.gz)
    Source code(zip)
  • v30.1(Dec 14, 2020)

    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-android under 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 for com.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 for NullPointerException or even deadlock. (To be clear, Guava will not log under Java 8 or Android, but it may log under Java 7.) (dc52e6e385)
      • 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.
    • base: Deprecated StandardSystemProperty.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 of null. (38abf07772)
    • net: Added HttpHeaders constants for Origin-Isolation and X-Request-ID. (a48fb4f724, 8319d201cd)
    • reflect: Added ClassInfo.isTopLevel(). (410627262b)
    • util.concurrent: Added ClosingFuture.submitAsync(AsyncClosingCallable). (c5e2d8d5cb)
    Source code(tar.gz)
    Source code(zip)
  • v30.0(Oct 16, 2020)

    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 in LocalCache under j2objc. (5e519d91d0)
    • collect: Added two-element min and max methods to Comparators. (958186c071)
    • collect: Removed @Beta from Multimaps.toMultimap. (b6b4dc49b1)
    • collect: Made the set returned by ImmutableMap<K, V>.keySet() serializable as long as K is serializable, even if V is not (and similarly for values()). (f5a69c33fc)
    • collect: Fixed bug in powerSet.equals(otherPowerSet) would erroneously return false if the two power sets' underlying sets were equal but had a different iteration order. (215b1f0dd7)
    • collect: Eliminated j2objc retain-cycle in SingletonImmutableBiMap. (0ad38b88bd)
    • eventbus: Prevented @Subscribe from being applied to a method that takes a primitive, as that will never be called. (554546c971)
    • graph: Made Traverser.breadthFirst() lazier, and optimized Traverser more generally. (32f2d770f7, b5210ca95c)
    • graph: Added @DoNotMock to Traverser. (6410f18c06)
    • io: Deprecated Files.createTempDir(). (fec0dbc463) (CVE-2020-8908; continuing discussion in https://github.com/google/guava/issues/4011)
    • ~~io: Upgraded ByteStreams.copy(InputStream, OutputStream) to use the faster FileChannel if possible. (a1e9a0bd12)~~ [update: My mistake: This was rolled back, so it did not make 30.0.]
    • math: Added roundToDouble to BigDecimalMath, BigIntegerMath, and LongMath. (bee4f3c7ed, 2b5c096ddf, 633abf2c62)
    • net: Added MediaType constants for several font/ types. (571cf66bac)
    • net: Added HttpHeaders constants for Cross-Origin-Embedder-Policy(-Report-Only)?. (c3bf73187a)
    • testing: Made EqualsTester test that non-String objects are not equal to their String representations. (c9570eae69)
    • util.concurrent: Added ClosingFuture. (52e048ed6c)
    • util.concurrent: Removed the deprecated 1-arg ServiceManager.addListener(Listener). Use the 2-arg addListener(Listener, Executor) overload, setting the executor to directExecutor() for equivalent behavior. (dfb0001714)
    • util.concurrent: Changed AbstractFuture.toString() to no longer include the toString() of the result. (2ebf27fd45)
    • util.concurrent: Added awaitTerminationUninterruptibly. (f07b9540dc)
    Source code(tar.gz)
    Source code(zip)
  • v29.0(Apr 13, 2020)

    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_rpc system property to true. (5214a10b1e)
      • This is the only breaking change in this release, and it affects only users of the guava-gwt artifact, not people who use only the guava artifact. This release contains no changes that break binary compatibility for any users.
    • 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: Annotated FluentIterable.from(FluentIterable) with @DoNotCall. (b1c77b7df3)
    • collect: Made ceiling, floor, headSet(E, boolean), and tailSet(E, boolean) methods available in the GWT-emulated ImmutableSortedSet. (7e0fe90ca8, 5f2fbf27b2)
    • graph: Made it possible to set a stable incident edge order by calling the newly added method [Value]Graph.Builder.incidentEdgeOrder(ElementOrder.stable()). (70164025a8)
    • graph: Added incidentEdgeOrder() to the [Value]Graph interfaces. (cde576ec00)
    • util.concurrent: Added Duration-based default methods to ListeningScheduledExecutorService. (931e83f969)
    • util.concurrent: Added immediateVoidFuture. (9f3bae5853)
    • util.concurrent: Removed @Beta from Service and related classes. (dc46627fea)
    • util.concurrent: Deprecated the 1-arg overload of ServiceManager.addListener. (86e3620125)
    • util.concurrent: Changed the return type of ServiceManager.servicesByState() to ImmutableSetMultimap (but also retained a method with the old signature for binary compatibility). (31999ae6f5)
    • util.concurrent: Made it safe to load the AbstractFuture class from a ForkJoinPool thread under a security manager. (6e0c5b5d50)
    Source code(tar.gz)
    Source code(zip)
  • v28.2(Dec 27, 2019)

    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_rpc system property to false. (Even without the system property enabled, apps will now log warnings when sending Guava types over GWT-RPC.) (08bbf53ab0)
    • base: Added Splitter.splitToStream().
    • concurrent: Added Futures.submit() (c7ef0cc93b)
    • concurrent: Made platformThreadFactory() and related utilities (mainly *Service) work under Java 11 App Engine, and tweaked other App Engine threading behavior. (e3ee00d6769d219c9646a17114fa00e2955b54aa)
    • concurrent: Added catch to StackOverflowError in AbstractFuture.toString to prevent long chains of futures from failing toString calls. (a2e6acc009)
    • concurrent: Made ListenableFuture implement Thenable via a default interface method in GWT/j2cl (e0bac74571).
    • graph: Fixed bug in AbstractNetwork.hasEdgeConnecting() causing it to throw if either endpoint was not in the graph. Originally reported as #3721. (2ee7f9da69)
    • graph: Fixed data race. (0e94fb5bb8)
    • math: Added Stream support to Stats and StatsAccumulator. (e2f4eba636)
    • math: Added Quantiles compute() methods which return a Map now return a map with entries in the same order in which the indexes were provided. (786c3d84f1)
    • net: Added support for scope IDs for IPv6 addresses. (8a7d36a8e5044096919a3512aa6734c95032f38c)
    • net: Added toBigInteger and fromIpv4BigInteger/fromIpv6BigInteger to InetAddresses for manipulating InetAddresses as BigIntegers (d7a0b3d367)
    • net: Added MediaType constants for application/opensearchdescription+xml (f79c4fe0a7) and MPEG-DASH (67dd062cb9), as well as a constant for the header Cross-Origin-Opener-Policy (4ef2111641).
    • net: Made MediaType reject empty type, subtype, and attribute (b080067) and non-ASCII parameter values (2278123479). Also, made it serialize empty parameter values to quoted strings (2278123479).
    • Added @DoNotMock to several types. (4eea0f79c2, add430908ec77c1859f84bd753b84a5eca57b327)
    • Removed dependency on animal-sniffer-annotations. (5f37e53fd7)
    Source code(tar.gz)
    Source code(zip)
  • v28.1(Aug 28, 2019)

    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: Added RangeMap.merge, analogous to Map.merge. (687252d35)
    • collect: Fixed a bug in ImmutableSet.Builder that could lead to infinite loops when building multiple sets from the same builder. (0007cb257)
    • io: Fixed an issue where the InputStream returned by BaseEncoding.decodingStream(Reader) could fail to throw DecodingException while decoding an invalid string. (ddd4a49fb)
    • net: Added MediaType for "image/heif" and "image/jp2" (508696a4c)
    • net: Added Upgrade-Insecure-Requests header to HttpHeaders. (6a8b716af)
    • concurrent: Fixed potential memory leak in Futures.whenAllSucceed/whenAllComplete (494834bd4)
    Source code(tar.gz)
    Source code(zip)
  • v28.0(Jun 11, 2019)

    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: Added Duration-based overloads to some Queues methods. (21d06cf1d48175ab5cdf3d88f1776d3cba227b37)
    • net: Added MediaType for "application/geo+json". (36cd5cfc5)
    • net: Added a number of constants to HttpHeaders.
    • concurrent: Removed deprecated CheckedFuture and related utilities. (3dd22fe75)
    • concurrent: Added Duration-based overloads to many methods.
    • concurrent: Removed @Beta from setFuture. (5ec136091)
    • concurrent: Added deprecated FluentFuture.from(FluentFuture) to point out redundant code. (f9f280776)
    • graph: Added GraphBuilder.immutable(),ValueGraphBuilder.immutable() and NetworkBuilder.immutable() for building immutable graphs in a fluent way.
    • J2ObjC: Fixed crashes from use of ImmutableMap.entrySet(). (74fc49faf)
    Source code(tar.gz)
    Source code(zip)
  • v27.1(Mar 8, 2019)

    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. (5f3507252)
    • Created a BOM for Guava (new guava-bom artifact). (0e5964129)
    • Removed @Beta from a number of frequently used APIs. (6242bdd27)
    • net: Added Sec-Fetch headers to HttpHeaders. (673b24376)
    • net: Added SourceMap header to HttpHeaders (a99c15f4c)
    • net: Added MediaType for "application/jose" and "application/jose+json". (d416e04cf)
    • graph: Added overloads to methods accepting pairs of nodes to also accept EndpointPair; changed behavior of *Graph.edges().contains() to allow undirected graphs to accept ordered EndpointPairs. (af3ee1c59)
    Source code(tar.gz)
    Source code(zip)
  • v27.0.1(Nov 19, 2018)

    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

    • Fixes an issue where classes that should only be included in failureaccess (Guava's one dependency) were also being included in the main Guava jar. (4d4a6765f)
    • Updates the version of failureaccess that Guava depends on to 1.0.1, which includes OSGi metadata. (7aae5f348)
    Source code(tar.gz)
    Source code(zip)
  • v27.0(Oct 18, 2018)

    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. (b62d52926)

    • collect: Added a gap(Range) method to Range that computes the Range that lies between them. (a9dd7098f)
    • net: Added HttpHeaders.EARLY_DATA. (e074cf1a7)
    • net: Added MediaType.WASM_APPLICATION. (0b3eb0f4e)
    • concurrent: AbstractFuture doesn't expose FluentFuture APIs anymore. (0f8d3608a)
    • concurrent: Added doCancelStart protected method to AbstractService (27bfe412b)
    Source code(tar.gz)
    Source code(zip)
  • v26.0(Aug 1, 2018)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • base: Removed deprecated public static fields from CharMatcher. Use the equivalent public static methods instead. (f1249c4f0)
    • base: Fixed the ServiceConfigurationError that some users encountered when using Guava as a JPMS module. (8287cdfa3)
    • cache: Fixed a bug where Cache.asMap.compute* methods could cause nonsensical weights to be stored, breaking cache eviction. (15764d7f3)
    • concurrent: Removed deprecated Futures methods that implicitly use directExecutor(). (87d87f5ca)
    • concurrent: Added ExecutionSequencer, a new utility to run a series of asynchronous operations serially. (8d1fbc96e)
    • concurrent: Removed special-casing UndeclaredThrowableException in Futures.transform(). (9466b62f5)
    • net: Changed HostAndPort.equals() and hashCode() to stop depending on whether brackets were included. Now they depend only on host and port. (34c161627)
    • net: Added HttpHeaders constant for Sec-Metadata header. (986a3a3ef)
    • net: Added MediaType for "application/hal+json". (fea88fe49)
    Source code(tar.gz)
    Source code(zip)
    guava-26.0-android.jar(2.47 MB)
    guava-26.0-jre.jar(2.61 MB)
    guava-testlib-26.0-android.jar(764.58 KB)
    guava-testlib-26.0-jre.jar(832.99 KB)
  • v25.1(May 31, 2018)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • Switched to the type annotation version of @Nullable in the JRE/Java 8 flavor. (0a2258e66)
    • base: Added Strings.lenientFormat(), copied from Preconditions.format(). (7fe1702ae)
    • net: Added Token Binding HTTP headers to HttpHeaders. (d9113d51b)
    • reflect: Added overrides for methods on JDK types returning AnnotatedType in the JRE/Java 8 flavor. (d94eb93fb)
    • testing: Added support for type annotations in NullPointerTester in the JRE/Java 8 flavor. (d94eb93fb)
    • util.concurrent: Added @DoNotCall to Futures methods that do not accept an Executor in preparation for removal. (49a1df62b)
    Source code(tar.gz)
    Source code(zip)
  • v23.6.1(May 31, 2018)

  • v24.1.1(Apr 26, 2018)

    Note that we've also released Guava 25.0, which contains the change in 24.1.1 and some additional changes.

    Maven

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

    Javadoc

    JDiff

    (There are no API diffs from 24.1. Our release tooling generated the following diffs against the newer 25.0, which doesn't really make sense. We'll try to get that fixed for future patch releases.)

    Changelog

    • Fixed Denial of Service vulnerability for servers that use Guava and deserialize attacker data: CVE-2018-10237. (7ec8718f1)
    Source code(tar.gz)
    Source code(zip)
  • v25.0(Apr 25, 2018)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • Fixed Denial of Service vulnerability for servers that use Guava and deserialize attacker data: CVE-2018-10237. (f89ece572)
    • cache: Added java.time.Duration overloads to CacheBuilder. (9bf6d9590)
    • io: Removed deprecated Files.fileTreeTraverser() and MoreFiles.directoryTreeTraverser(). (ce6d93c20)
    Source code(tar.gz)
    Source code(zip)
  • v24.1(Mar 15, 2018)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • collect: Added hash flooding protection to ImmutableSet, ImmutableMultiset, ImmutableMap and ImmutableBiMap
    • graph: Added support for traversing from multiple start nodes in Traverser. (cbc530844)
    • net: Added X-Download-Options header to HttpHeaders (9b9a17535)
    • net: Added L16 audio constant to MediaType
    Source code(tar.gz)
    Source code(zip)
  • v24.0(Feb 1, 2018)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • base: Removed deprecated Predicates.assignableFrom(Class). (d57a40e54)
    • collect: Removed deprecated BinaryTreeTraverser. (f91ef6ca6)
    • concurrent: Removed deprecated Futures.dereference and MoreExecutors.sequentialExecutor. (f91ef6ca6)
    • graph: Removed deprecated Graphs.equivalent() (41fa39fa7)
    • graph: Added incidentEdges() method to Graph and ValueGraph. (d788bc15f)
    • net: Added HttpHeaders.HTTP2_SETTINGS header according to http://httpwg.org/specs/rfc7540.html#Http2SettingsHeader (393066e5b)
    • net: Added MediaType.withParameters method that can replace a specific attribute with zero or more values. (7da42d206)
    Source code(tar.gz)
    Source code(zip)
  • v23.6(Dec 21, 2017)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • concurrent: Added Uninterruptibles methods for Condition. (794a8ca43)
    • concurrent: Added a run method to FutureCombiner to allow passing a Runnable to Futures.whenAllComplete and Futures.whenAllSucceed (de28fd831)
    • concurrent: Made Futures.getUnchecked available under GWT. (b1d9d99b6)
    • net: Added "Server-Timing" HTTP header to HttpHeaders according to https://www.w3.org/TR/server-timing/ (f089e55e5)
    • testing: Started recognizing @NullableDecl in NullPointerTester and friends.
    • Migrated from jsr305 @Nullable to the Checker Framework @NullableDecl. Tools that read these annotations may need to be updated to recognize the new annotation. For Kotlin in particular, we sent a pull request, which has been merged for 1.2.20.
    • Migrated from jsr305 @CheckReturnValue, @GuardedBy and @OverridingMethodsMustInvokeSuper to the Error Prone equivalents.
    Source code(tar.gz)
    Source code(zip)
  • v23.5(Nov 22, 2017)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • base: Graduated Verify and VerifyException from @Beta. (0ad9c4410)
    • collect: ImmutableMap.getOrDefault is now also available in the Android flavor. (1e4938c)
    • graph: Tightened the contract for the edge-adding methods on Mutable{Graph, Network, ValueGraph}. This is a breaking change; implementors of these interfaces should verify that they still comply with this contract. (ec48806ee)
    • io: Added Files.fileTraverser() and MoreFiles.fileTraverser(). (af7514acd)
    • io: Deprecated Files.fileTreeTraverser() and MoreFiles.directoryTreeTraverser(). (1644f6ea9)
    • Migrated from jsr305's @Immutable to Error Prone's. (901e98559)
    • Added a dependency on, but did not begin using, the Checker Framework's annotations. We expect to begin using it in a future release.
      • If you're using maven-plugin-plugin, the Checker Framework dependency may trigger a bug. To fix it, upgrade maven-plugin-plugin to 3.5. We expect this problem to go away with Guava 23.6, which will change to a different Checker Framework dependency.
    Source code(tar.gz)
    Source code(zip)
  • v23.4(Nov 9, 2017)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • collect: Added support for empty ArrayTable.
    • net: Added Referrer-Policy to HttpHeaders, along with possible values for that header in ReferrerPolicyValues. (19b4d977a)
    • util.concurrent: Adjusted the interruption behavior of MoreExecutors.sequentialExecutor() to run tasks without a Thread interrupt marked (previously, interrupts leaked between tasks). If the Thread was interrupted when the Executor received it or during execution of its tasks, the thread will be re-interrupted before being yielded. Expanded the documentation of MoreExecutors.sequentialExecutor() to cover interruption and rejected execution behavior in detail. (40564c741)
    • Upgraded the version of GWT we test with to 2.8.2. We haven't yet intentionally depended on this new version, but now that we're testing with it, we may come to depend on it accidentally.
    Source code(tar.gz)
    Source code(zip)
  • v23.3(Oct 26, 2017)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • base: Updated hardcoded CharMatcher.digit() and invisible() from Unicode 6.3 to Unicode 9.
    • graph: Deprecated TreeTraverser and BinaryTreeTraverser. Please use com.google.common.graph.Traverser instead.
    • net: Added methods for dealing with registry suffixes to InternetDomainName.
    • util.concurrent: Introduced MoreExecutors.newSequentialExecutor, the new name for sequentialExecutor.
    Source code(tar.gz)
    Source code(zip)
  • v23.2(Oct 11, 2017)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • Added JPMS module name com.google.common for Guava.
    • base: Deprecated built-in CharMatchers which cannot work as expected because the API does not support supplementary code points.
    • collect: Fixed https://github.com/google/guava/issues/2962
    • collect: Fixed a bug in HashBiMap.inverse().forcePut()
    • graph: Added implementation for common.graph.Traverser, a new class that provides efficient breadth-first and depth-first traversal of graphs and trees. It should be used in place of common.collect.TreeTraverser, which will be deprecated.
    • graph: Fixed regression in ValueGraph.edgeValueOrDefault() (from Guava 23) that caused it sometimes to return null instead of the default value.
    Source code(tar.gz)
    Source code(zip)
  • v23.1(Sep 27, 2017)

    Maven

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

    Javadoc

    JDiff

    Changelog

    • New policy: For the indefinite future, we won't remove APIs (except those annotated @Beta).
    • FYI: This release is the first since our move to more frequent releases.
    • It is also the first to use the version format 23.1-jre (rather than just 23.1) for the non-Android artifact.
    • Guava should now be Java-9 compatible with the exception of the GWT-compatible libraries, which await a GWT release.
    • base: Added overloads of Verify.verify for different combinations of primitive and Object arguments
    • collect: Added builderWithExpectedSize factory methods for ImmutableCollection builders
    • graph: ~~Added Traverser<N> for graph and tree traversals~~
      • Note: Don't actually use this yet; most operations currently throw UnsupportedOperationException. Apologies!
    • primitives: Added reverse and sortDescending methods for primitive arrays
    • reflect: Updated ClassPath to continue to work with the system classloader under Java 9. (63898e263ddcdae00fc760fdaf97d90c8a656608)
    • util.concurrent: Added Executors.sequentialExecutor(Executor)
    Source code(tar.gz)
    Source code(zip)
  • v23.0-rc1(Aug 7, 2017)

  • v23.0(Aug 7, 2017)

  • v22.0(May 23, 2017)

  • v22.0-rc1(May 23, 2017)

  • v21.0-rc2(Jan 3, 2017)

    Second release candidate for Guava 21.0.

    This release candidate fixes a small issue with rc1; a number of methods that create Collectors took Guava's functional types (e.g. base.Function) as parameters rather than the java.util.function equivalent.

    This release requires Java 8.

    Source code(tar.gz)
    Source code(zip)
    guava-21.0-rc2-javadoc.jar(5.80 MB)
    guava-21.0-rc2-sources.jar(1.42 MB)
    guava-21.0-rc2.jar(2.40 MB)
    guava-gwt-21.0-rc2.jar(1.09 MB)
    guava-testlib-21.0-rc2-javadoc.jar(2.02 MB)
    guava-testlib-21.0-rc2-sources.jar(431.14 KB)
    guava-testlib-21.0-rc2.jar(809.73 KB)
Owner
Google
Google ❤️ Open Source
Google
Google core libraries for Java

Guava: Google Core Libraries for Java Guava is a set of core Java libraries from Google that includes new collection types (such as multimap and multi

Google 41.9k Aug 3, 2021
Purpose for this base architectural project is to load it with all latest components and libraries So it become reference for all kind of Android projects

The purpose of this base architectural project is to load it with all the latest components and libraries, So it becomes a reference for all kinds of Android projects

null 6 Jul 11, 2021
ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

ZXing Project 28.2k Aug 2, 2021
Android validation library which helps developer boil down the tedious work to three easy steps.

AwesomeValidation Introduction Implement validation for Android within only 3 steps. Developers should focus on their awesome code, and let the librar

Jing Li 1.1k Jul 29, 2021
A boiler plate that can be re-used to start android apps

Agile Boiler Plate The main task at the innovation labs of Avast is to find new ideas to work on, prototype these ideas, and quickly implement them. A

Abed Almoradi 45 Jun 26, 2019
A comprehensive tutorial for Android Data Binding

精通 Android Data Binding 更多干货可移步至个人主页 QQ 交流群:324112728 ,或者点击链接加入QQ群 官方虽然已经给出了教程 - Data Binding Guide (中文版 - Data Binding(数据绑定)用户指南) ,但是实践之后发现槽点实在太多,于是就

Fei Liang 2.6k Jul 25, 2021
Experimental optical character recognition app

android-ocr An experimental app for Android that performs optical character recognition (OCR) on images captured using the device camera. Runs the Tes

Robert Theis 2.2k Jul 24, 2021
RxJava binding APIs for Android's UI widgets.

RxBinding RxJava binding APIs for Android UI widgets from the platform and support libraries. Download Platform bindings: implementation 'com.jakewhar

Jake Wharton 9.7k Jul 26, 2021
A Job Queue specifically written for Android to easily schedule jobs (tasks) that run in the background, improving UX and application stability.

Development in this repository is stopped. Future development continues on https://github.com/yigit/android-priority-jobqueue ========================

Path Mobile Inc Pte. Ltd. 2.4k Jul 15, 2021
Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process

FileDownloader Android multi-task file download engine. 中文文档 FileDownloader2 Now, FileDownloader2-OkDownload is released, okdownload will contain all

LAIX Inc. (formerly LingoChamp Inc.) 10.3k Jul 28, 2021
A plug and play ;) android library for displaying a "rate this app" dialog

Easy Rating Dialog This lib provides a simple way to display an alert dialog for rating app. Default conditions to show: User opened the app more than

Fernando Martínez 113 Dec 25, 2020
A gradle plugin for getting java lambda support in java 6, 7 and android

Gradle Retrolambda Plugin This plugin will automatically build your java or android project with retrolambda, giving you lambda goodness on java 6 or

Evan Tatarka 5.4k Jul 26, 2021
A customized video view that will automatically pause video is user is not looking at device screen!!!!!

UserAwareVideoView Featured in: Medium What is this library for? UserAwareVideoView is a customizable VideoView that smartly play and pause the video

Keval Patel 51 Jun 27, 2021
Android Library to help you with your runtime Permissions.

PermissionHelper Android Library to help you with your runtime Permissions. Demo Android M Watch it in action. Pre M Watch it in action. Nexus 6 (M) N

Kosh Sergani 1.2k Jul 25, 2021