Skip to content

Commit

Permalink
Remove obsolete Error Prone warning suppressions (#2497)
Browse files Browse the repository at this point in the history
The latest Error Prone version fixed a bug which makes these
suppressions obsolete.
  • Loading branch information
Marcono1234 authored Sep 23, 2023
1 parent 8756189 commit ff401f1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
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

0 comments on commit ff401f1

Please sign in to comment.