Fix Google-internal common.collect
tests under an Android emulator.
#6652
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.
Fix Google-internal
common.collect
tests under an Android emulator.The primary change comes as a followup to cl/543468006: Now that the Google-internal
ImmutableTable
declares methods with Java 8+ types in their signatures, we get aNoClassDefFoundError
when performing reflection on the class under old Android emulators. We perform reflection only when (a) usingNullPointerTester
or (b) using serialization. So we (a) stop runningNullPointerTester
under an Android emulator (though we continue to run the sameguava-android
test under a JVM) and (b) specify aserialVersionUID
so that serialization doesn't need to compute one. (SpecifyingserialVersionUID
was our MO for a while. Perhaps we just got careless, and perhaps we should be more diligent. Alternatively, perhaps we should change theserialVersionUID
every release or so so as to encourage people not to persist serialized data. I at least went to a tiny bit of effort to keepguava-jre
andguava-android
on differentserialVersionUID
values, though maybe that's more likely to cause needless trouble someday than to prevent it?)The other change is to avoid running another GC test under an Android emulator. We'd originally done this for one copy of
AbstractIteratorTester
in cl/444929745, but for whatever reason, we didn't need it for the other copy until (I assume) cl/546307327 and its switch to a different emulator version.RELNOTES=n/a