Skip to content

Commit

Permalink
Suppress a warning from Error Prone. (#2724)
Browse files Browse the repository at this point in the history
These inner classes are deliberately not static for the purposes of tests.
  • Loading branch information
eamonnmcmanus authored Aug 1, 2024
1 parent 17c74eb commit c4b6c81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gson/src/test/java/com/google/gson/reflect/TypeTokenTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public void testParameterizedFactory_Invalid() {
+ GenericWithMultiBound.class);

class Outer {
@SuppressWarnings("ClassCanBeStatic")
class NonStaticInner<T> {}
}

Expand Down Expand Up @@ -344,6 +345,7 @@ private static <M> void createTypeTokenTypeVariable() {
public void testTypeTokenTypeVariable() throws Exception {
// Put the test code inside generic class to be able to access `T`
class Enclosing<T> {
@SuppressWarnings("ClassCanBeStatic")
class Inner {}

void test() {
Expand Down

0 comments on commit c4b6c81

Please sign in to comment.