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

Remove obsolete Error Prone warning suppressions #2497

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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import java.io.IOException;
import org.junit.jupiter.api.Test;

@SuppressWarnings("UnusedVariable") // workaround for https://github.com/google/error-prone/issues/2713
class Java17RecordReflectionTest {
public record PublicRecord(int i) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public void testMultipleNamesInTheSameString() {
.isEqualTo("v3");
}

@SuppressWarnings("unused")
private record RecordWithCustomNames(
@SerializedName("name") String a,
@SerializedName(value = "name1", alternate = {"name2", "name3"}) String b) {}
Expand Down Expand Up @@ -256,7 +255,6 @@ public void testPrimitiveAdapterNullValue() {
.isEqualTo("null is not allowed as value for record component 'aByte' of primitive type; at path $.aByte");
}

@SuppressWarnings("unused")
private record RecordWithPrimitives(
String aString, byte aByte, short aShort, int anInt, long aLong, float aFloat, double aDouble, char aChar, boolean aBoolean) {}

Expand Down Expand Up @@ -410,9 +408,7 @@ public void testReflectionFilterBlockInaccessible() {
assertThat(gson.fromJson("{\"i\":2}", PublicRecord.class)).isEqualTo(new PublicRecord(2));
}

@SuppressWarnings("unused")
private record PrivateRecord(int i) {}
@SuppressWarnings("unused")
public record PublicRecord(int i) {}

/**
Expand Down