Skip to content

Commit

Permalink
Recognize that compareUnsigned is safe on Byte and Short. (#64)
Browse files Browse the repository at this point in the history
They have been always desugared since

https://r8.googlesource.com/r8/+/4b8c252dbd34d0b8d1d5defe7bbe5da288eed677,
which came shortly after support for `Long` and `Integer`,

https://r8.googlesource.com/r8/+/62ef970fea988efa2bbfc81e68d1072d5ab930d7,
which is already recognized by Gummy Bears.
  • Loading branch information
cpovirk authored Jul 23, 2024
1 parent 2ffc2af commit 2448b8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sugar/basic/src/main/java/desugar/java/lang/DesugarByte.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package desugar.java.lang;

public final class DesugarByte {
public static int compareUnsigned(byte x, byte y) {
throw new RuntimeException();
}

public static int hashCode(byte i) {
throw new RuntimeException();
}
Expand Down
4 changes: 4 additions & 0 deletions sugar/basic/src/main/java/desugar/java/lang/DesugarShort.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package desugar.java.lang;

public final class DesugarShort {
public static int compareUnsigned(short x, short y) {
throw new RuntimeException();
}

public static int hashCode(short i) {
throw new RuntimeException();
}
Expand Down

0 comments on commit 2448b8c

Please sign in to comment.