From 18131c054336ac33a1071fca718a8378e250bea3 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Wed, 15 Jan 2025 14:14:03 -0800 Subject: [PATCH] Update suppressions for usage of `sun.misc.Unsafe`. - As best I can tell (cl/712957106, cl/714130759), the `removal` suppressions aren't accomplishing anything. RELNOTES=n/a PiperOrigin-RevId: 715941598 --- android/guava/src/com/google/common/cache/Striped64.java | 2 +- .../guava/src/com/google/common/hash/LittleEndianByteArray.java | 2 +- android/guava/src/com/google/common/hash/Striped64.java | 2 +- .../guava/src/com/google/common/primitives/UnsignedBytes.java | 2 +- .../src/com/google/common/util/concurrent/AbstractFuture.java | 2 +- guava/src/com/google/common/hash/LittleEndianByteArray.java | 2 +- guava/src/com/google/common/primitives/UnsignedBytes.java | 2 +- guava/src/com/google/common/util/concurrent/AbstractFuture.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/guava/src/com/google/common/cache/Striped64.java b/android/guava/src/com/google/common/cache/Striped64.java index 8599fea81f35..a5241528f035 100644 --- a/android/guava/src/com/google/common/cache/Striped64.java +++ b/android/guava/src/com/google/common/cache/Striped64.java @@ -25,7 +25,7 @@ * striping on 64bit values. The class extends Number so that concrete subclasses must publicly do * so. */ -@SuppressWarnings({"SunApi", "removal"}) // b/345822163 +@SuppressWarnings("SunApi") // b/345822163 @GwtIncompatible abstract class Striped64 extends Number { /* diff --git a/android/guava/src/com/google/common/hash/LittleEndianByteArray.java b/android/guava/src/com/google/common/hash/LittleEndianByteArray.java index cba12de50bbe..24148966386c 100644 --- a/android/guava/src/com/google/common/hash/LittleEndianByteArray.java +++ b/android/guava/src/com/google/common/hash/LittleEndianByteArray.java @@ -135,7 +135,7 @@ private interface LittleEndianBytes { * Unsafe.theUnsafe is inaccessible, the attempt to load the nested class fails, and the outer * class's static initializer can fall back on a non-Unsafe version. */ - @SuppressWarnings({"SunApi", "removal"}) // b/345822163 + @SuppressWarnings("SunApi") // b/345822163 @VisibleForTesting enum UnsafeByteArray implements LittleEndianBytes { // Do *not* change the order of these constants! diff --git a/android/guava/src/com/google/common/hash/Striped64.java b/android/guava/src/com/google/common/hash/Striped64.java index 6aa6ab0af261..aa7185509f13 100644 --- a/android/guava/src/com/google/common/hash/Striped64.java +++ b/android/guava/src/com/google/common/hash/Striped64.java @@ -26,7 +26,7 @@ * so. */ @GwtIncompatible -@SuppressWarnings({"SunApi", "removal"}) // b/345822163 +@SuppressWarnings("SunApi") // b/345822163 abstract class Striped64 extends Number { /* * This class maintains a lazily-initialized table of atomically diff --git a/android/guava/src/com/google/common/primitives/UnsignedBytes.java b/android/guava/src/com/google/common/primitives/UnsignedBytes.java index 377c2d61bebb..669fcff2c5e3 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/android/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -292,7 +292,7 @@ static class LexicographicalComparatorHolder { static final Comparator BEST_COMPARATOR = getBestComparator(); - @SuppressWarnings({"SunApi", "removal"}) // b/345822163 + @SuppressWarnings("SunApi") // b/345822163 @VisibleForTesting enum UnsafeComparator implements Comparator { INSTANCE; diff --git a/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java b/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java index 4b119e03b162..4bb4609e4fd7 100644 --- a/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java @@ -1336,7 +1336,7 @@ abstract boolean casListeners( *

Static initialization of this class will fail if the {@link sun.misc.Unsafe} object cannot * be accessed. */ - @SuppressWarnings({"SunApi", "removal"}) // b/345822163 + @SuppressWarnings("SunApi") // b/345822163 private static final class UnsafeAtomicHelper extends AtomicHelper { static final Unsafe UNSAFE; static final long LISTENERS_OFFSET; diff --git a/guava/src/com/google/common/hash/LittleEndianByteArray.java b/guava/src/com/google/common/hash/LittleEndianByteArray.java index 1753ddcd78f3..bc72ffd46491 100644 --- a/guava/src/com/google/common/hash/LittleEndianByteArray.java +++ b/guava/src/com/google/common/hash/LittleEndianByteArray.java @@ -170,7 +170,7 @@ public boolean usesFastPath() { * Unsafe.theUnsafe is inaccessible, the attempt to load the nested class fails, and the outer * class's static initializer can fall back on a non-Unsafe version. */ - @SuppressWarnings({"SunApi", "removal"}) // b/345822163 + @SuppressWarnings("SunApi") // b/345822163 @VisibleForTesting enum UnsafeByteArray implements LittleEndianBytes { // Do *not* change the order of these constants! diff --git a/guava/src/com/google/common/primitives/UnsignedBytes.java b/guava/src/com/google/common/primitives/UnsignedBytes.java index 56956de85095..17bef0dff9a4 100644 --- a/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -294,7 +294,7 @@ static class LexicographicalComparatorHolder { static final Comparator BEST_COMPARATOR = getBestComparator(); - @SuppressWarnings({"SunApi", "removal"}) // b/345822163 + @SuppressWarnings("SunApi") // b/345822163 @VisibleForTesting enum UnsafeComparator implements Comparator { INSTANCE; diff --git a/guava/src/com/google/common/util/concurrent/AbstractFuture.java b/guava/src/com/google/common/util/concurrent/AbstractFuture.java index 02d8aa94bfa6..5759ac5d0778 100644 --- a/guava/src/com/google/common/util/concurrent/AbstractFuture.java +++ b/guava/src/com/google/common/util/concurrent/AbstractFuture.java @@ -1464,7 +1464,7 @@ private static LinkageError newLinkageError(Throwable cause) { *

Static initialization of this class will fail if the {@link sun.misc.Unsafe} object cannot * be accessed. */ - @SuppressWarnings({"SunApi", "removal"}) // b/345822163 + @SuppressWarnings("SunApi") // b/345822163 private static final class UnsafeAtomicHelper extends AtomicHelper { static final Unsafe UNSAFE; static final long LISTENERS_OFFSET;