From 49dbc6f072317c3a90985d778449a39ff5044a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89amonn=20McManus?= Date: Tue, 9 May 2023 10:28:39 -0700 Subject: [PATCH] Update Error Prone, bypass a bug in it, fix some problems it flags (#2387) --- .../test/java/com/google/gson/FieldNamingPolicyTest.java | 4 ++-- pom.xml | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gson/src/test/java/com/google/gson/FieldNamingPolicyTest.java b/gson/src/test/java/com/google/gson/FieldNamingPolicyTest.java index f72a8317ec..7a971e00b0 100644 --- a/gson/src/test/java/com/google/gson/FieldNamingPolicyTest.java +++ b/gson/src/test/java/com/google/gson/FieldNamingPolicyTest.java @@ -99,7 +99,7 @@ class Dummy { try { // Verify that default Locale has different case conversion rules assertWithMessage("Test setup is broken") - .that(name.toUpperCase()).doesNotMatch(expected); + .that(name.toUpperCase(Locale.getDefault())).doesNotMatch(expected); for (FieldNamingPolicy policy : policies) { // Should ignore default Locale @@ -138,7 +138,7 @@ class Dummy { try { // Verify that default Locale has different case conversion rules assertWithMessage("Test setup is broken") - .that(name.toLowerCase()).doesNotMatch(expected); + .that(name.toLowerCase(Locale.getDefault())).doesNotMatch(expected); for (FieldNamingPolicy policy : policies) { // Should ignore default Locale diff --git a/pom.xml b/pom.xml index 5c5a789402..0607d2dc1c 100644 --- a/pom.xml +++ b/pom.xml @@ -132,7 +132,11 @@ -XDcompilePolicy=simple - -Xplugin:ErrorProne -XepExcludedPaths:.*/generated-test-sources/protobuf/.* + -Xplugin:ErrorProne + -XepExcludedPaths:.*/generated-test-sources/protobuf/.* + -Xep:HidingField:OFF + -Xep:NotJavadoc:OFF + -Xlint:all,-options @@ -141,7 +145,7 @@ com.google.errorprone error_prone_core - 2.18.0 + 2.19.0