Age | Commit message (Collapse) | Author |
|
|
|
Instead of requiring modules to explicitly depend on one of the guava
targets, we provide an alias that matches the correct dependency
depending on what Bazel configuration is available for that dependency
edge.
In particular, this allows error_prone to build as a host module and
depend on the host-only Guava library.
Bug: 215229742
Test: build/bazel/bp2build.sh
Change-Id: I714834695a124316c1d80cd734555d177f608bd6
|
|
Original change: https://android-review.googlesource.com/c/platform/external/guava/+/1916937
Change-Id: If7ada921b99f60a9c57ab208aa440bd0231699dc
|
|
|
|
Bug: 209959432
Test: N/A. Only comments added.
Change-Id: I66f027cd08d0fe8a98b3d8440a1c3908ac57df07
|
|
Original change: https://android-review.googlesource.com/c/platform/external/guava/+/1913366
Change-Id: I4b7cc803fdc3e763f438882e27ad01a1e2c4b7e2
|
|
|
|
The update was made using the following commands:
git fetch upstream-guava-v31.0.1
git merge FETCH_HEAD
In order to update guava, you need a branch (tags are not
supported). See b/209469232 for more context.
The following (preferred method) was attempted without success:
m external_updater
external_updater update guava
Bug: 208828829
Test: m
Change-Id: I948d94b6eaabc0c39910eaae84835d683bd69517
|
|
|
|
RELNOTES=n/a
PiperOrigin-RevId: 399242763
|
|
If we use `@Nullable`, the GWT compiler requires access to _the source code for `@Nullable`_ -- at least when `@Nullable` appears in _certain_ locations (type parameter bounds, type arguments, maybe others?). When we began using those annotations in those locations, I inserted a workaround into our own build to supply access to the source code for `@Nullable`. (That required not only depending on that source code but also providing a hacky, local `.gwt.xml` file. That means that our _users_ would _also_ need to do both of those things, which we really shouldn't require.) I had intended to improve upon this before the 31.0 release, but I didn't make a note about it in the right place :(
The fix of simply removing the annotations works fine, since only the GWT compiler ever sees these sources, and it doesn't care about type annotations.
(OK, our j2cl users could eventually care about the lack of annotations. But we haven't yet we applied `@NullMarked` to our classes externally, so the difference to them is between "lack of nullness information" and "possibly null" -- which means essentially nothing.)
(One way to look at this CL is as an edited, very partial rollback of CL 364918297.)
RELNOTES=Fixed [GWT compilation failure](https://groups.google.com/g/guava-discuss/c/I32pgyyj1N8/m/pXcyky2hAgAJ) introduced in release 31.0.
PiperOrigin-RevId: 399190627
|
|
RELNOTES=n/a
PiperOrigin-RevId: 398792880
|
|
The docs in `ClassToInstanceMap` describe some compromises we have to make to do this as best we can with our existing nullness annotations.
RELNOTES=n/a
PiperOrigin-RevId: 398734814
|
|
RELNOTES=n/a
PiperOrigin-RevId: 398498984
|
|
Device-Memory, Downlink, ECT, RTT, Save-Data, Viewport-Width, Width, and Permissions-Policy.
RELNOTES=n/a
PiperOrigin-RevId: 398305066
|
|
a78cbbc85b am: 3c1fe6ec61
Original change: https://android-review.googlesource.com/c/platform/external/guava/+/1822092
Change-Id: I7218d6f3ebf9b102c1a55ebd08c36a429604ecde
|
|
Original change: https://android-review.googlesource.com/c/platform/external/guava/+/1822092
Change-Id: Idfa35b959804adf0115bccff50aafcaae15ad10b
|
|
Original change: https://android-review.googlesource.com/c/platform/external/guava/+/1822092
Change-Id: Ia161aa249786f02952f464dc556c66e06b2951eb
|
|
|
|
PiperOrigin-RevId: 398119439
|
|
RELNOTES=n/a
PiperOrigin-RevId: 398094937
|
|
RELNOTES=n/a
PiperOrigin-RevId: 398090070
|
|
`X-Device-Accept-Language`, and `X-Device-Requested-With`.
RELNOTES=`net`: Added `HttpHeaders` constants for `X-Device-Ip`, `X-Device-Referer`, `X-Device-Accept-Language`, and `X-Device-Requested-With`.
PiperOrigin-RevId: 398045292
|
|
PiperOrigin-RevId: 398039336
|
|
RELNOTES=n/a
PiperOrigin-RevId: 397761983
|
|
RELNOTES=n/a
PiperOrigin-RevId: 397392532
|
|
RELNOTES=n/a
PiperOrigin-RevId: 397391544
|
|
RELNOTES=n/a
PiperOrigin-RevId: 397386982
|
|
Test: b build external/guava/...
Change-Id: I6fad9e02cf1d4850407abd4a36757b83fe2a4a94
|
|
This new method is equivalent to the existing `ImmutableMap.Builder.build()`. `build()` now just calls `buildOrThrow()` and will soon be deprecated. The idea is to make it more obvious that duplicate keys will cause an exception.
Make similar changes to the builders of `ImmutableBiMap`, `ImmutableSortedMap`, and `ImmutableTable`.
RELNOTES=The method `ImmutableMap.Builder.build()` is now renamed to `buildOrThrow()`. The existing `build()` method will continue to exist but will be deprecated and the new name should be used in new code.
PiperOrigin-RevId: 396865988
|
|
Add to `ImmutableMap` a method like this:
```
@SafeVarargs
public static <K, V> ImmutableMap<K, V> ofEntries(Map.Entry<? extends K, ? extends V>... entries)
```
The method throws IllegalArgumentException if two entries have the same key. It throws NullPointerExeption if `entries` is null or if any key or value in any entry is null. These specifications make it a drop-in replacement for [`Map.ofEntries`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html#ofEntries(java.util.Map.Entry...)) with the added advantages that it has an explicitly immutable type and that it has a defined iteration order (which is the order of the entries as they appear in the arguments to `ofEntries`).
We hide `ofEntries` with a method in the subclass `ImmutableSortedMapFauxverrideShim` that has the same signature and throws an exception. We already do this for `ImmutableMap.of`, for example. If we did not do it then people could write `ImmutableSortedMap.ofEntries` and they would actually end up calling `ImmutableMap.ofEntries` since `ImmutableMap` is an ancestor of `ImmutableSortedMap`. We can't override `ofEntries` to return `ImmutableSortedMap` because we would want the `K` type parameter to have a `Comparable` bound, but you can't change type parameter bounds when overriding (really "hiding") static methods. People can achieve the desired effect with `ImmutableSortedMap.copyOf(ImmutableMap.ofEntries(...))`. (`java.util` has `Map.ofEntries` but it doesn't have `SortedMap.ofEntries` or `NavigableMap.ofEntries`.)
We are not planning anything currently for `ImmutableMultimap` etc.
RELNOTES=`collect`: Added `ImmutableMap.ofEntries`, like `Map.ofEntries` but for `ImmutableMap`.
PiperOrigin-RevId: 395991240
|
|
affects `NullPointerTester`.
Concretely, if I remove `@ParametricNullness` from the parameter in `Equivalence.wrap`, `NullPointerTester` thinks that `null` is never a valid input.
RELNOTES=n/a
PiperOrigin-RevId: 395942764
|
|
This doesn't fix a practical problem today.
What it does do is unblock us from adding checking (which will run in our internal builds) that will detect the main problems described in https://github.com/google/guava/issues/3990.
RELNOTES=n/a
PiperOrigin-RevId: 395740030
|
|
`UncaughtExceptionHandler`.
RELNOTES=n/a
PiperOrigin-RevId: 395541203
|
|
`ImmutableSortedMap.of` for up to 10 entries
RELNOTES=`collect`: Added overloads of `ImmutableMap.of`, `ImmutableBiMap.of`, and `ImmutableSortedMap.of` for up to 10 entries.
PiperOrigin-RevId: 395508372
|
|
The bug was found by @findepi who also contributed the fix and the new tests via https://github.com/google/guava/pull/5649.
Fixes https://github.com/google/guava/issues/5648.
RELNOTES=`hash`: Deprecated buggy `murmur3_32`, and introduced `murmur3_32_fixed`.
PiperOrigin-RevId: 395463974
|
|
RELNOTES=Add `@InlineMe` to `Streams.stream(Optional)` and friends.
PiperOrigin-RevId: 395248008
|
|
Fixes #5698
PiperOrigin-RevId: 394579757
|
|
17](https://developer.android.com/reference/android/os/SystemClock#elapsedRealtimeNanos()).
RELNOTES=n/a
PiperOrigin-RevId: 394251009
|
|
Fixes #5691
Fixes #5692
RELNOTES=n/a
PiperOrigin-RevId: 393150511
|
|
RELNOTES=n/a
PiperOrigin-RevId: 392914141
|
|
flavor.
It doesn't work there, even under new versions of Android, so it always triggers fallback, and the process of falling back burns resources and produces noise.
(JRE users of guava-android could benefit from the `ClassValue` implementation, but now that we're dropping support for Java 7 from guava-android, there's no reason for them to use it. OK, probably some users run _Robolectric_ tests against guava-android. But presumably they aren't _too_ sensitive to the performance of `getChecked` in the failure case.)
Removing `ClassValue` support also lets us remove a bunch of Animal-Sniffer cruft. That includes upgrading it to 1.19, which in turn forces us to remove some usages of new APIs from our _tests_ -- not nearly as important as usages in _prod_ but still a good idea so that any future Android test failures are reported to us correctly instead of hidden by `NoSuchMethodError` or similar. Or actually, Animal-Sniffer 1.20 [turned checking of test sources back off](https://github.com/mojohaus/animal-sniffer/commit/ac40ac46b3e02f0edf986bb43be7a45cc5382937), but let's opt in anyway, at least to see how it goes, at least for the tests of guava-testlib. (guava-tests itself is more of a pain, so I left a TODO.)
RELNOTES=n/a
PiperOrigin-RevId: 391779058
|
|
Fixes https://github.com/google/guava/issues/5674.
RELNOTES=In collection test suites, the `setUp` and `tearDown` are copied to derived test suites.
PiperOrigin-RevId: 391626825
|
|
RELNOTES=n/a
PiperOrigin-RevId: 391583762
|
|
continuous nullness checking for.
RELNOTES=n/a
PiperOrigin-RevId: 391583418
|
|
RELNOTES=n/a
PiperOrigin-RevId: 391298503
|
|
In `HostAndPort.fromString`, we previously allowed any Unicode digit. But the RFCs generally call for ASCII digits specifically.
Document that `InetAddresses.forString` and related methods _do_ allow non-ASCII digits and explain how to check for their presence. We found that a number of projects were testing that these digits work, so changing that seems risky.
Fixes https://github.com/google/guava/issues/5681.
Fixes https://github.com/google/guava/issues/5682.
Thanks to @Marcono1234 for the bug report.
RELNOTES=`net`: Port numbers spelled with non-ASCII digits are no longer allowed in `HostAndPort.fromString`.
PiperOrigin-RevId: 390396550
|
|
RELNOTES=n/a
PiperOrigin-RevId: 389909243
|
|
`ClassToInstanceMap` in an upcoming CL.
RELNOTES=n/a
PiperOrigin-RevId: 389869643
|
|
RELNOTES=n/a
PiperOrigin-RevId: 389761126
|