Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update suppressions for usage of sun.misc.Unsafe. #7620

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/guava/src/com/google/common/cache/Striped64.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
2 changes: 1 addition & 1 deletion android/guava/src/com/google/common/hash/Striped64.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static class LexicographicalComparatorHolder {

static final Comparator<byte[]> BEST_COMPARATOR = getBestComparator();

@SuppressWarnings({"SunApi", "removal"}) // b/345822163
@SuppressWarnings("SunApi") // b/345822163
@VisibleForTesting
enum UnsafeComparator implements Comparator<byte[]> {
INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ abstract boolean casListeners(
* <p>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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
2 changes: 1 addition & 1 deletion guava/src/com/google/common/primitives/UnsignedBytes.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static class LexicographicalComparatorHolder {

static final Comparator<byte[]> BEST_COMPARATOR = getBestComparator();

@SuppressWarnings({"SunApi", "removal"}) // b/345822163
@SuppressWarnings("SunApi") // b/345822163
@VisibleForTesting
enum UnsafeComparator implements Comparator<byte[]> {
INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ private static LinkageError newLinkageError(Throwable cause) {
* <p>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;
Expand Down
Loading