Update Error Prone, bypass a bug in it, fix some problems it flags (#2387)

This commit is contained in:
Éamonn McManus 2023-05-09 10:28:39 -07:00 committed by GitHub
parent b330ad9790
commit 49dbc6f072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -99,7 +99,7 @@ public class FieldNamingPolicyTest {
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 @@ public class FieldNamingPolicyTest {
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

View File

@ -132,7 +132,11 @@
<compilerArgs>
<!-- Args related to Error Prone, see: https://errorprone.info/docs/installation#maven -->
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne -XepExcludedPaths:.*/generated-test-sources/protobuf/.*</arg>
<arg>-Xplugin:ErrorProne
-XepExcludedPaths:.*/generated-test-sources/protobuf/.*
-Xep:HidingField:OFF <!-- https://github.com/google/error-prone/issues/3895 -->
-Xep:NotJavadoc:OFF <!-- Triggered by local class. -->
</arg>
<!-- Enable all warnings, except for ones which cause issues when building with newer JDKs, see also
https://docs.oracle.com/en/java/javase/11/tools/javac.html -->
<compilerArg>-Xlint:all,-options</compilerArg>
@ -141,7 +145,7 @@
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</path>
</annotationProcessorPaths>
</configuration>