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-jre or 30.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-jre</version>
  <!-- or, for Android: -->
  <version>30.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-jre")

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

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

  // 4. Android - Use Guava types in your public API:
  api("com.google.guava:guava:30.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 at runtime: com.google.guava:failureaccess:1.0.1

  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 unit-test the libraries using only OpenJDK 1.8 on Linux. Some features, especially in com.google.common.io, may not work correctly in other environments. For the Android flavor, our unit tests 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 Automatic-Module-Name for guava-testlib

    Add Automatic-Module-Name for guava-testlib

    guava-testlib should have an Automatic-Module-Name for use in dependent modular projects. It seems that its module name, guava.testlib is derived from the filename as of 30.1.1.-jre. Issue https://github.com/google/guava/issues/2920 and related issues only added a module name for Guava itself.

    While guava-testlib is most frequently used as a test-scoped dependency, there are cases where one may need to refer to its module name. Testing on the module path is possible. Sometimes this is necessary for IDE compatibility, as in https://github.com/ben-manes/caffeine/pull/540

    P2 platform=java11 type=other 
    opened by A248 0
  • checkNotNull's argument should not be marked as NonNull

    checkNotNull's argument should not be marked as NonNull

    checkNotNull ensures that output it's not null, it's this method responsibility to check non-nullability. NotNull on input parameter should be used if method assumes input is not null/requires it.

    Adding NotNull broke IntelliJ's code analysis. IntelliJ assumed that NonNull argument must be null on method input, however in fact method's contract is to ensure that on output the value is not null.

    P3 cla: yes package=base type=enhancement 
    opened by TomaszGaweda 9
  • Allow `MoreFiles.fileTraverser()` to have customizable error handling

    Allow `MoreFiles.fileTraverser()` to have customizable error handling

    Context

    I've noticed that when using Kotlin's File.walk function, if it doesn't have permission to read a subdirectory, it will just skip over that subdirectory by default.

    If one wanted to handle that case as an error, they'd use FileTreeWalk.onFail. For example,

    aDirectory.walk().onFail { fileOrSubdirectory, ex -> println(ex.message) }
    

    (This is the same behaviour as Java's Files.walkFileTree, where one implements FileVisitor::visitFileFailed to also handle any unreadable files/directories.)

    By comparison, Java's Files.walk stream and Guava's MoreFiles.fileTraverser() let the unreadable directory bubble up as an IOException. This means that if either of these APIs can't read a file/directory, they stop there and then, rather than reading on.

    I think this behaviour makes these two APIs impractical sometimes. In fact, there seems to be evidence for this, with a StackOverflow question and a now-closed Java bug report on Java's Files.walk.

    Feature request

    Consider giving MoreFiles.fileTraverser() a customizable, more lenient error-handling mechanism than just bubbling up the first IOException that occurs.

    For example, Guava could introduce something like Kotlin's FileTreeWalk.onFail, which would allow code like,

    Path directory = ...;
    Iterable<Path> filesAndDirectories =
        MoreFiles.fileTraverser()
            .onFail((file, ex) -> System.err.println(ex.getMessage()))
            .breadthFirst(directory);
    for (var path : filesAndDirectories) {
      println(path)
    }
    

    This would forward any IOExceptions to onFail, rather than throwing them, and resume traversing afterwards.

    Note: Implementation-wise, this probably means that MoreFiles.fileTraverser() would need to return a new sub-type of Traverser that has an onFail method, or a new type altogether.

    P3 package=io type=enhancement 
    opened by jbduncan 1
  • Simplify the logic of `CaseFormat.convert`.

    Simplify the logic of `CaseFormat.convert`.

    Simplify the logic of CaseFormat.convert.

    In this version, it is clearer to both humans and static analysis that the StringBuilder is not null when it is appended to. Additionally, the previous version could allocate a StringBuilder twice, while this version will not.

    The new logic produces different results for some edge cases. For example, converting _FOO_BAR from upper-underscore to lower-camel used to produce FooBar while now it produces _fooBar. The spec says A "best effort" approach is taken; if {@code str} does not conform to the assumed format, then the behavior of this method is undefined but we make a reasonable effort at converting anyway. None of the thousands of usages in Google's code base has any tests that are affected by this change.

    RELNOTES=n/a

    cla: yes 
    opened by copybara-service[bot] 0
  • Further document NullPointerException thrown by TreeMultimap methods (and Multimap methods in general)?

    Further document NullPointerException thrown by TreeMultimap methods (and Multimap methods in general)?

    Hello. Executing of such code triggers NPE:

    TreeMultimap.create().get(null);
    
    Exception in thread "main" java.lang.NullPointerException
    	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:877)
    	at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:36)
    	at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:26)
    	at com.google.common.collect.TreeMultimap.createCollection(TreeMultimap.java:143)
    	at com.google.common.collect.AbstractMapBasedMultimap.get(AbstractMapBasedMultimap.java:291)
    	at com.google.common.collect.AbstractSetMultimap.get(AbstractSetMultimap.java:75)
    	at com.google.common.collect.AbstractSortedSetMultimap.get(AbstractSortedSetMultimap.java:87)
    	at com.google.common.collect.TreeMultimap.get(TreeMultimap.java:167)
    

    According to method's javadoc, an empty collections should be returned:

    Returns a collection view of all values associated with a key. If no mappings in the multimap
    have the provided key, an empty collection is returned.
    

    but instead an NPE is thrown.

    As a fix, may be it is worth to remove keyComparator().compare(key, key) invocation in com.google.common.collect.TreeMultimap#createCollection(K) and invoke simply super.createCollection(key)?

    P4 package=collect type=api-docs 
    opened by AnkBurov 3
  • Broken link in Javadoc

    Broken link in Javadoc

    1. Go to https://guava.dev/releases/30.1.1-jre/api/docs/
    2. Search for "unsignedbytes"
    3. Get redirected to https://guava.dev/releases/30.1.1-jre/api/docs/undefined/com/google/common/primitives/UnsignedBytes.html which returns HTTP 404.
    P2 package=general type=defect 
    opened by cowwoc 5
  • Add Duration parsing support to match Abseil C++ and Golang

    Add Duration parsing support to match Abseil C++ and Golang

    Golang's time.ParseDuration routine parses a very human-readable string format for duration values. This functionality was ported into the Abseil C++ library which makes it easy to consume the same duration strings in both C++ and Golang. Java does have support for Duration parsing to a java.time.Duration, but not in the same format. If the same routines were ported to Guava, then the same format could be used easily across all three languages.

    Proposed API change:

    package com.google.common.base;
    
    import java.time.Duration;
    
    /**
     * Collection of utilities for working with duration and timestamp values with an emphasis on supporting
     * cross-language conventions.
     */
    public final class Time {
      /**
       * Parses input {@code text} into a {@code java.time.Duration} using the duration format string
       * implemented in Golang's {@code time.ParseDuration} and Abseil C++ {@code time::ParseDuration}
       */ 
      public static  Duration parseDuration(CharSequence text) {
        ...
      }
    }
    

    For reference: https://github.com/abseil/abseil-cpp/blob/9fde5a6eb081ea080f5aa895102a9154c3a2d09f/absl/time/time.h#L548 https://golang.org/pkg/time/#ParseDuration

    P3 package=general type=addition 
    opened by TristonianJones 4
  • ImmutableGraph inherits implementation methods from AbstractBaseGraph

    ImmutableGraph inherits implementation methods from AbstractBaseGraph

    com.google.common.graph.ImmutableGraph inherits some protected methods from the package-private class AbstractBaseGraph, these methods are therefore part of ImmutableGraph's public API. Affected:

    These methods should probably be package-private since they appear to be part of the internal implementation. It would probably be good to mark them as @Deprecated first and then remove them later.

    P3 package=graph type=defect 
    opened by Marcono1234 6
  • Cache recursive compute may deadlock

    Cache recursive compute may deadlock

    ConcurrentHashMap used to livelock on a recursive computation in Java 8, and later added early detection to fail. Many years ago, Guava's loader used to deadlock and I added a check via Thread.holdsLock to error instead (see waitForLoadingValue). It appears that map computations may deadlock because it doesn't have this check and instead waits on the pending future.

    public void testMerge_recurse() {
      cache = CacheBuilder.newBuilder().build();
      cache.put(key, "1");
    
      // As we cannot provide immediate checking without an expensive solution, e.g. ThreadLocal,
      // instead we assert that a stack overflow error will occur to inform the developer (vs
      // a live-lock or deadlock alternative).
      BiFunction<String, String, String> mappingFunction =
          new BiFunction<String, String, String>() {
            int recursed;
    
            @Override public String apply(String oldValue, String value) {
              if (++recursed == 2) {
                throw new StackOverflowError();
              }
              return cache.asMap().merge(key, "1", this);
            }
          };
      try {
        cache.asMap().merge(key, "1", mappingFunction);
        Assert.fail();
      } catch (StackOverflowError e) {}
    }
    
    P3 package=cache platform=java8 type=defect 
    opened by ben-manes 2
  • Cache's computeIfPresent discards if error'd entry

    Cache's computeIfPresent discards if error'd entry

    It appears that we still have a bug in the compute logic. The test case below should retain the previous value when the compute throws an error. Instead the failed compute is left in the cache and the prior value can be read. When the next compute occurs, it treats the exception as a null old value, ignores the mappingFunction, and removes the entry.

    public void testComputeIfPresent_error() {
      var cache = CacheBuilder.newBuilder().build();
      cache.put(key, "1");
      try {
        cache.asMap().computeIfPresent(key, (key, value) -> { throw new Error(); });
      } catch (Error e) {}
      assertEquals("1", cache.getIfPresent(key));
      assertEquals("2", cache.asMap().computeIfPresent(key, (k, v) -> "2")); // fails; removes mapping
    }
    

    Caffeine's test suite runs against a Guava shim in order to verify backwards compatibility. I was trying to update that to delegate to Guava's compute implementations after #5406.

    P3 package=cache type=defect 
    opened by ben-manes 2
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>
    

    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
Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas

Arthas Arthas is a Java Diagnostic tool open sourced by Alibaba. Arthas allows developers to troubleshoot production issues for Java applications with

Alibaba 25k Mar 13, 2021
Micro second messaging that stores everything to disk

Chronicle Queue Contents Table of Contents Contents About Chronicle Software What is Chronicle Queue Java Docs Usage More benchmarks Downloading Chron

Chronicle Software : Open Source 2.3k Mar 13, 2021
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

null 1k Apr 13, 2021
Embulk: Pluggable Bulk Data Loader.

What's Embulk? Embulk is a parallel bulk data loader that helps data transfer between various storages, databases, NoSQL and cloud services. Embulk su

Embulk 1.5k Mar 12, 2021
JGit project repository (jgit)

Java Git An implementation of the Git version control system in pure Java. This project is licensed under the EDL (Eclipse Distribution License). JGit

Eclipse Foundation 977 Mar 10, 2021
A Java library for designing good error messages

JDoctor, a Java library for good error messages Designing good error messages is hard. In Java, most often, developers just rely on throwing exception

Cédric Champeau 25 Mar 26, 2021
Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons

Project architect: @victornoel ATTENTION: We're still in a very early alpha version, the API may and will change frequently. Please, use it at your ow

Yegor Bugayenko 616 Mar 13, 2021
Java lib for monitoring directories or individual files via java.nio.file.WatchService

ch.vorburger.fswatch Java lib for monitoring directories or individual files based on the java.nio.file.WatchService. Usage Get it from Maven Central

Michael Vorburger ⛑️ 19 Nov 11, 2020
An open-source Java library for Constraint Programming

Documentation, Support and Issues Contributing Download and installation Choco-solver is an open-source Java library for Constraint Programming. Curre

null 518 Mar 10, 2021
Ta4j is an open source Java library for technical analysis

Ta4j is an open source Java library for technical analysis. It provides the basic components for creation, evaluation and execution of trading strategies.

null 1k Apr 25, 2021
MinIO Client SDK for Java

MinIO Java SDK for Amazon S3 Compatible Cloud Storage MinIO Java SDK is Simple Storage Service (aka S3) client to perform bucket and object operations

High Performance, Kubernetes Native Object Storage 444 Mar 13, 2021
Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon

Stfalcon Fixturer A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can

Stfalcon LLC 29 Feb 15, 2021
Java regular expressions made easy.

JavaVerbalExpressions VerbalExpressions is a Java library that helps to construct difficult regular expressions. Getting Started Maven Dependency: <de

null 2.5k Mar 12, 2021
Java Constraint Programming solver

https://maven-badges.herokuapp.com/maven-central/org.jacop/jacop/badge.svg [] (https://maven-badges.herokuapp.com/maven-central/org.jacop/jacop/) JaCo

null 178 Mar 2, 2021