From 81115927dbed231c94e8f0e14aed6f0c19637a10 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 a28ab4542e..ac199fce0a 100644 --- a/pom.xml +++ b/pom.xml @@ -153,7 +153,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 @@ -162,7 +166,7 @@ com.google.errorprone error_prone_core - 2.18.0 + 2.19.0