Add ConcurrentMap spliterator checks#8371
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
CI's animal-sniffer check on the android variant (gummy-bears-api-23) rejected the Spliterator override added in the previous commit because java.util.Spliterator and Spliterators.spliteratorUnknownSize(...) are not part of Android API 23. Following the established pattern in ImmutableCollection.java, Ints.java, and Longs.java under android/guava/src, annotate the method with the package-local @IgnoreJRERequirement. The method is only invoked from APIs whose signatures already carry Java 8 types, so callers are already gated by the same constraint. The guava/src variant is unaffected because it uses the java18 signature, which includes Spliterator. Made-with: Cursor
df3d1f5 to
bcd722f
Compare
|
CI fix: the earlier run failed because the Pushed a follow-up commit (bcd722f) that annotates the new method with the package-local Verified locally:
|
|
I think |
| * map. Can't be invoked directly; please see {@link | ||
| * com.google.common.collect.testing.ConcurrentMapTestSuiteBuilder}. | ||
| * | ||
| * @author Louis Wasserman |
There was a problem hiding this comment.
This @author tag shouldn't be here. Besides being inaccurate here, we don't use @author tags at all anymore in new code.
There was a problem hiding this comment.
@cgdecker, thanks for the catch. Both fixed in d9e665d.
On the @author tag: I had copied the file header from a sibling tester (MapSpliteratorTester) as a starting point and missed removing the @author Louis Wasserman line. Sorry about that. I Dropped the tag entirely since new Guava code doesn't use them anymore.
There was a problem hiding this comment.
@cgdecker, thanks for the catch. Both fixed in d9e665d.
On the https://github.com/author tag: I had copied the file header from a sibling tester (MapSpliteratorTester) as a starting point and missed removing the https://github.com/author Louis Wasserman line. Sorry about that. I Dropped the tag entirely since new Guava code doesn't use them anymore.
- Override spliterator() on LocalCache.Values (CONCURRENT | NONNULL) in both the main and android variants, mirroring the existing AbstractCacheSet override (per cgdecker review on google#8371). The android variant uses @IgnoreJRERequirement to satisfy animal-sniffer's gummy-bears-api-23 signature. - Remove the inaccurate @author tag from the new ConcurrentMapSpliteratorTester; new Guava code no longer carries @author tags. Made-with: Cursor
Adds ConcurrentMap-specific testlib coverage for derived keySet and entrySet spliterators, and updates LocalCache to satisfy it in both the JRE and Android source trees.
Fixes #7855
Implementation:
Process:
Validation: