You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reimplement our compare methods in terms of JDK equivalents.
And migrate our own calls off our methods.
Guava has required Java 8 for a while now.
Note also that the APIs in question are available even under Android [even without opt-in library desugaring](https://r8.googlesource.com/r8/+/refs/heads/main/src/main/java/com/android/tools/r8/ir/desugar/BackportedMethodRewriter.java).
Further notes:
- I did not touch `UnsignedInteger`, `UnsignedInts`, `UnsignedLong`, or `UnsignedLongs` because the JDK equivalents aren't available under GWT or J2CL.
- I did not touch `UnsignedBytes.compare` because `Bytes.compareUnsigned`, while available under any version of Android, is not available on the JVM until Java 9.
- I did touch an _assertion_ about `UnsignedBytes.compare` because I noticed that it had its actual and expected values reversed.
RELNOTES=n/a
PiperOrigin-RevId: 655152611
0 commit comments