From 0a016b59f76205b622b6019b630787af808ea93a Mon Sep 17 00:00:00 2001 From: ibaker Date: Fri, 3 Nov 2023 05:17:28 -0700 Subject: [PATCH] Remove Guava @Beta API warning suppressions These are no longer needed now we've updated to 32.1.3 in https://github.com/androidx/media/commit/7a10435633b86e54425e320aee6d3b3ed4eb3216 PiperOrigin-RevId: 579149808 --- .../src/main/java/androidx/media3/common/util/Util.java | 6 ------ .../common/util/UtilScaleLargeValueParameterizedTest.java | 4 ---- 2 files changed, 10 deletions(-) diff --git a/libraries/common/src/main/java/androidx/media3/common/util/Util.java b/libraries/common/src/main/java/androidx/media3/common/util/Util.java index 328cd0c427..2a97a96892 100644 --- a/libraries/common/src/main/java/androidx/media3/common/util/Util.java +++ b/libraries/common/src/main/java/androidx/media3/common/util/Util.java @@ -1688,8 +1688,6 @@ public final class Util { // LongMath.saturatedMultiply is @Beta in the version of Guava we currently depend on (31.1) // but it is no longer @Beta from 32.0.0. This suppression is therefore safe because there's // no version of Guava after 31.1 that doesn't contain this symbol. - // TODO(b/290045069): Remove this suppression when we depend on Guava 32+. - @SuppressWarnings("UnstableApiUsage") @UnstableApi public static long scaleLargeValue( long value, long multiplier, long divisor, RoundingMode roundingMode) { @@ -1725,8 +1723,6 @@ public final class Util { // LongMath.saturatedMultiply is @Beta in the version of Guava we currently depend on (31.1) // but it is no longer @Beta from 32.0.0. This suppression is therefore safe because there's // no version of Guava after 31.1 that doesn't contain this symbol. - // TODO(b/290045069): Remove this suppression when we depend on Guava 32+. - @SuppressWarnings("UnstableApiUsage") @UnstableApi public static long[] scaleLargeValues( List values, long multiplier, long divisor, RoundingMode roundingMode) { @@ -1829,8 +1825,6 @@ public final class Util { // LongMath.saturatedMultiply is @Beta in the version of Guava we currently depend on (31.1) // but it is no longer @Beta from 32.0.0. This suppression is therefore safe because there's // no version of Guava after 31.1 that doesn't contain this symbol. - // TODO(b/290045069): Remove this suppression when we depend on Guava 32+. - @SuppressWarnings("UnstableApiUsage") private static long scaleLargeValueFallback( long value, long multiplier, long divisor, RoundingMode roundingMode) { long numerator = LongMath.saturatedMultiply(value, multiplier); diff --git a/libraries/common/src/test/java/androidx/media3/common/util/UtilScaleLargeValueParameterizedTest.java b/libraries/common/src/test/java/androidx/media3/common/util/UtilScaleLargeValueParameterizedTest.java index 84ec683dd9..3347070f8e 100644 --- a/libraries/common/src/test/java/androidx/media3/common/util/UtilScaleLargeValueParameterizedTest.java +++ b/libraries/common/src/test/java/androidx/media3/common/util/UtilScaleLargeValueParameterizedTest.java @@ -272,8 +272,6 @@ public class UtilScaleLargeValueParameterizedTest { * floating-point branch (which will cause this test to fail because passing * RoundingMode.UNNECESSARY won't be allowed). */ - // TODO(b/290045069): Remove this suppression when we depend on Guava 32+. - @SuppressWarnings("UnstableApiUsage") @Test public void cancelsRatherThanFallThroughToFloatingPoint() { long value = 24960; @@ -288,8 +286,6 @@ public class UtilScaleLargeValueParameterizedTest { assertThat(result).isEqualTo(520000); } - // TODO(b/290045069): Remove this suppression when we depend on Guava 32+. - @SuppressWarnings("UnstableApiUsage") @Test public void numeratorOverflowsAndCantBeCancelled() { // Use three Mersenne primes so nothing can cancel, and the numerator will (just) overflow 64