Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare to make ImmutableSet.toImmutableSet available in guava-android (but don't do so yet). #6804

Closed
wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link
Contributor

Prepare to make ImmutableSet.toImmutableSet available in guava-android (but don't do so yet).

This includes adding ImmutableCollection.spliterator() as a further attempt to shake out any problems that might arise when we make "real" API changes. The method is callable under API Level 24 or higher, under which it overrides the method inherited from Collection. (But when last I checked (over 2 years ago!), library desugaring rewrote it to not be an override: b/187166349.) In any case, we don't expect users to call it directly.

(Compare cl/543468006.)

This CL also includes updates to avoid problems with reflection when Java 8+ APIs are not present. That means adding a serialVersionUID (so that Java/Android reflection doesn't try to compute one with reflection) and skipping NullPointerTester under Android (though we still run NullPointerTester against the Android flavor under a JVM). (I might have added serialVersionUID more places than necessary; I'm not sure.)

(Compare cl/550872250.)

This CL is further progress toward #6567

(To make this work with some of our Android library-desugaring infrastructure, I had to first implement the new SequencedCollection methods in ImmutableSortedSet. That happened in cl/575207552.)

RELNOTES=n/a

…oid (but don't do so yet).

This includes adding `ImmutableCollection.spliterator()` as a further attempt to shake out any problems that might arise when we make "real" API changes. The method is callable under API Level 24 or higher, under which it overrides the method inherited from `Collection`. (But when last I checked (over 2 years ago!), library desugaring rewrote it to _not_ be an override: b/187166349.) In any case, we don't expect users to call it directly.

(Compare cl/543468006.)

This CL also includes updates to avoid problems with reflection when Java 8+ APIs are not present. That means adding a `serialVersionUID` (so that Java/Android reflection doesn't try to compute one with reflection) and skipping `NullPointerTester` under Android (though we still run `NullPointerTester` against the Android flavor under a JVM). (I might have added `serialVersionUID` more places than necessary; I'm not sure.)

(Compare cl/550872250.)

This CL is further progress toward #6567

(To make this work with some of our Android library-desugaring infrastructure, I had to first implement the new `SequencedCollection` methods in `ImmutableSortedSet`. That happened in cl/575207552.)

RELNOTES=n/a
PiperOrigin-RevId: 573288649
@copybara-service copybara-service bot force-pushed the test_573288649 branch 2 times, most recently from 330bb9c to 050f89f Compare October 25, 2023 20:35
@copybara-service copybara-service bot closed this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant