Skip to content

Commit

Permalink
Remove @GwtIncompatible from LongMath.checkedAdd
Browse files Browse the repository at this point in the history
RELNOTES=Remove @GwtIncompatible from LongMath.checkedAdd
PiperOrigin-RevId: 443380750
  • Loading branch information
java-team-github-bot authored and Google Java Core Libraries committed Apr 21, 2022
1 parent e7b86f4 commit ac878a5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ public void testGCDNegativeZeroThrows() {
}

@AndroidIncompatible // slow
@GwtIncompatible // TODO
public void testCheckedAdd() {
for (long a : ALL_LONG_CANDIDATES) {
for (long b : ALL_LONG_CANDIDATES) {
Expand Down
1 change: 0 additions & 1 deletion android/guava/src/com/google/common/math/LongMath.java
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ public static long gcd(long a, long b) {
*
* @throws ArithmeticException if {@code a + b} overflows in signed {@code long} arithmetic
*/
@GwtIncompatible // TODO
public static long checkedAdd(long a, long b) {
long result = a + b;
checkNoOverflow((a ^ b) < 0 | (a ^ result) >= 0, "checkedAdd", a, b);
Expand Down
1 change: 0 additions & 1 deletion guava-tests/test/com/google/common/math/LongMathTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ public void testGCDNegativeZeroThrows() {
}

@AndroidIncompatible // slow
@GwtIncompatible // TODO
public void testCheckedAdd() {
for (long a : ALL_LONG_CANDIDATES) {
for (long b : ALL_LONG_CANDIDATES) {
Expand Down
1 change: 0 additions & 1 deletion guava/src/com/google/common/math/LongMath.java
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ public static long gcd(long a, long b) {
*
* @throws ArithmeticException if {@code a + b} overflows in signed {@code long} arithmetic
*/
@GwtIncompatible // TODO
public static long checkedAdd(long a, long b) {
long result = a + b;
checkNoOverflow((a ^ b) < 0 | (a ^ result) >= 0, "checkedAdd", a, b);
Expand Down

0 comments on commit ac878a5

Please sign in to comment.