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

Fix Google-internal common.collect tests under an Android emulator. #6652

Closed
wants to merge 1 commit into from

Commits on Jul 25, 2023

  1. 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](#6567), we get a `NoClassDefFoundError` when performing reflection on the class under old Android emulators. We perform reflection only when (a) using `NullPointerTester` or (b) using serialization. So we (a) stop running `NullPointerTester` under an Android emulator (though we continue to run the same `guava-android` test under a JVM) and (b) specify a `serialVersionUID` so that serialization doesn't need to compute one. (Specifying `serialVersionUID` was our MO for a while. Perhaps we just got careless, and perhaps we should be more diligent. Alternatively, perhaps we should change the `serialVersionUID` every release or so so as to encourage people [not to persist serialized data](https://github.com/google/guava#important-warnings). I at least went to a tiny bit of effort to keep `guava-jre` and `guava-android` on different `serialVersionUID` 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
    PiperOrigin-RevId: 550670580
    cpovirk authored and Google Java Core Libraries committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    b860d73 View commit details
    Browse the repository at this point in the history