From aa4f6f7c3ad7d2d2c14e200c04079c7fc1172719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89amonn=20McManus?= Date: Thu, 1 Aug 2024 11:08:49 -0700 Subject: [PATCH] Suppress a warning from Error Prone. These inner classes are deliberately not static for the purposes of tests. --- gson/src/test/java/com/google/gson/reflect/TypeTokenTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gson/src/test/java/com/google/gson/reflect/TypeTokenTest.java b/gson/src/test/java/com/google/gson/reflect/TypeTokenTest.java index d0e13805cd..ddc6b92973 100644 --- a/gson/src/test/java/com/google/gson/reflect/TypeTokenTest.java +++ b/gson/src/test/java/com/google/gson/reflect/TypeTokenTest.java @@ -282,6 +282,7 @@ public void testParameterizedFactory_Invalid() { + GenericWithMultiBound.class); class Outer { + @SuppressWarnings("ClassCanBeStatic") class NonStaticInner {} } @@ -344,6 +345,7 @@ private static void createTypeTokenTypeVariable() { public void testTypeTokenTypeVariable() throws Exception { // Put the test code inside generic class to be able to access `T` class Enclosing { + @SuppressWarnings("ClassCanBeStatic") class Inner {} void test() {