From c4b6c814aa35444220c176f43dcf4249e7c2259d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89amonn=20McManus?= Date: Thu, 1 Aug 2024 11:13:46 -0700 Subject: [PATCH] Suppress a warning from Error Prone. (#2724) 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() {