Prepare to make ImmutableSet.toImmutableSet
available in guava-android (but don't do so yet).
#6804
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fromCollection
. (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 skippingNullPointerTester
under Android (though we still runNullPointerTester
against the Android flavor under a JVM). (I might have addedserialVersionUID
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 inImmutableSortedSet
. That happened in cl/575207552.)RELNOTES=n/a