皇上,还记得我吗?我就是1999年那个Linux伊甸园啊-----24小时滚动更新开源资讯,全年无休!

Guava 31.1 发布

Guava 31.1 发布

Maven

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

Jar files

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

Javadoc

JDiff

Changelog

  • base: Deprecated the Throwables methods lazyStackTrace and lazyStackTraceIsLazy. They are no longer useful on any current platform. (6ebd7d8)
  • collect: Added a new method ImmutableMap.Builder.buildKeepingLast(), which keeps the last value for any given key rather than throwing an exception when a key appears more than once. (68500b2)
  • collect: As a side-effect of the buildKeepingLast() change, the idiom ImmutableList.copyOf(Maps.transformValues(map, function)) may produce different results if function has side-effects. (This is not recommended.) (68500b2)
  • hash: Added Hashing.fingerprint2011(). (13f703c)
  • io: Changed ByteStreams.nullOutputStream() to follow the contract of OutputStream.write by throwing an exception if the range of bytes is out of bounds. (1cd85d0)
  • net: Added @CheckReturnValue to the package (with a few exceptions). (a0e2577)
  • net: Added HttpHeaders constant for Access-Control-Allow-Private-Network. (6dabbdf)
  • util.concurrent: Added accumulate/update methods for AtomicDouble and AtomicDoubleArray. (2d875d3)

APIs promoted from @Beta

  • baseThrowables methods getCausalChain and getCauseAs (dd462af)
  • collectStreams methods mapWithIndex and findLast (8079a29)
  • collect: the remaining methods in ComparatorsminmaxlexicographicalemptiesFirstemptiesLastisInOrderisInStrictOrder (a3e411c)
  • escape: various APIs (468c68a)
  • io: various APIs in Files (828d9ee)
  • net: various APIs (261ac7a)
  • reflect: various APIs (9f6a384)
  • testlib: various APIs (93a8f02)
  • util.concurrentAsyncCallableListenableScheduledFuture, and ClosingFuture (8b4ad17)
  • util.concurrentExecutionSequencerMoreExecutors.newSequentialExecutor, and Monitor (189d668)
  • util.concurrentFutures methods: submitsubmitAsyncscheduleAsyncnonCancellationPropagatinginCompletionOrder (e015172)
  • util.concurrentUninterruptiblesawaitTerminationUninterruptibly and the Duration overloads in the class (825de9a)
  • util.concurrent: the FluentFuture type, its factory methods, and addCallback (9c7e13b)