Skip to content

Commit

Permalink
Update Error Prone, bypass a bug in it, fix some problems it flags (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnmcmanus authored and tibor-universe committed Aug 17, 2024
1 parent e2903d1 commit 8111592
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gson/src/test/java/com/google/gson/FieldNamingPolicyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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>
Expand All @@ -162,7 +166,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>
Expand Down

0 comments on commit 8111592

Please sign in to comment.