Skip to content

Commit

Permalink
Bump Error Prone to 2.36.0, including setting `--should-stop=ifError=…
Browse files Browse the repository at this point in the history
…FLOW`.

Fixes google/jimfs#383

In Guava, resolve a https://errorprone.info/bugpattern/DuplicateBranches error (though that will [soon be only a warning](google/error-prone#4700)) by just eliminating the branch. Hopefully that is fine.

RELNOTES=n/a
PiperOrigin-RevId: 700364699
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Nov 26, 2024
1 parent 74c75ca commit 63f5727
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,8 @@ public void testRoundLog2Half() {
for (RoundingMode mode : asList(HALF_EVEN, HALF_UP, HALF_DOWN)) {
double x = Math.scalb(Math.sqrt(2) + 0.001, exp);
double y = Math.scalb(Math.sqrt(2) - 0.001, exp);
if (exp < 0) {
assertEquals(exp + 1, DoubleMath.log2(x, mode));
assertEquals(exp, DoubleMath.log2(y, mode));
} else {
assertEquals(exp + 1, DoubleMath.log2(x, mode));
assertEquals(exp, DoubleMath.log2(y, mode));
}
assertEquals(exp + 1, DoubleMath.log2(x, mode));
assertEquals(exp, DoubleMath.log2(y, mode));
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<truth.version>1.4.4</truth.version>
<jsr305.version>3.0.2</jsr305.version>
<checker.version>3.43.0</checker.version>
<errorprone.version>2.28.0</errorprone.version>
<errorprone.version>2.36.0</errorprone.version>
<j2objc.version>3.0.0</j2objc.version>
<!-- Empty for all JDKs but 9-12 -->
<maven-javadoc-plugin.additionalJOptions></maven-javadoc-plugin.additionalJOptions>
Expand Down Expand Up @@ -144,6 +144,7 @@
<arg>doesnotexist</arg>
<!-- https://errorprone.info/docs/installation#maven -->
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>

<!-- https://errorprone.info/docs/installation#maven -->
<!-- TODO(cpovirk): Enable NullArgumentForNonNullParameter for
Expand Down Expand Up @@ -173,7 +174,7 @@
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.33.0</version>
<version>2.36.0</version>
</path>
</annotationProcessorPaths>
<!-- Fork because we need args like add-exports. (But see the TODO above about .mvn/jvm.config.) -->
Expand Down
9 changes: 2 additions & 7 deletions guava-tests/test/com/google/common/math/DoubleMathTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,8 @@ public void testRoundLog2Half() {
for (RoundingMode mode : asList(HALF_EVEN, HALF_UP, HALF_DOWN)) {
double x = Math.scalb(Math.sqrt(2) + 0.001, exp);
double y = Math.scalb(Math.sqrt(2) - 0.001, exp);
if (exp < 0) {
assertEquals(exp + 1, DoubleMath.log2(x, mode));
assertEquals(exp, DoubleMath.log2(y, mode));
} else {
assertEquals(exp + 1, DoubleMath.log2(x, mode));
assertEquals(exp, DoubleMath.log2(y, mode));
}
assertEquals(exp + 1, DoubleMath.log2(x, mode));
assertEquals(exp, DoubleMath.log2(y, mode));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ val expectedReducedRuntimeClasspathAndroidVersion =
"j2objc-annotations-3.0.0.jar",
"jsr305-3.0.2.jar",
"checker-qual-3.43.0.jar",
"error_prone_annotations-2.28.0.jar",
"error_prone_annotations-2.36.0.jar",
"listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"
)
val expectedReducedRuntimeClasspathJreVersion =
Expand All @@ -21,7 +21,7 @@ val expectedReducedRuntimeClasspathJreVersion =
"j2objc-annotations-3.0.0.jar",
"jsr305-3.0.2.jar",
"checker-qual-3.43.0.jar",
"error_prone_annotations-2.28.0.jar",
"error_prone_annotations-2.36.0.jar",
"listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"
)
val expectedCompileClasspathAndroidVersion = expectedReducedRuntimeClasspathAndroidVersion
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<truth.version>1.4.4</truth.version>
<jsr305.version>3.0.2</jsr305.version>
<checker.version>3.43.0</checker.version>
<errorprone.version>2.28.0</errorprone.version>
<errorprone.version>2.36.0</errorprone.version>
<j2objc.version>3.0.0</j2objc.version>
<!-- Empty for all JDKs but 9-12 -->
<maven-javadoc-plugin.additionalJOptions></maven-javadoc-plugin.additionalJOptions>
Expand Down Expand Up @@ -145,6 +145,7 @@
<arg>doesnotexist</arg>
<!-- https://errorprone.info/docs/installation#maven -->
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>

<!-- https://errorprone.info/docs/installation#maven -->
<!-- TODO(cpovirk): Enable NullArgumentForNonNullParameter for
Expand Down Expand Up @@ -174,7 +175,7 @@
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.33.0</version>
<version>2.36.0</version>
</path>
</annotationProcessorPaths>
<!-- Fork because we need args like add-exports. (But see the TODO above about .mvn/jvm.config.) -->
Expand Down

0 comments on commit 63f5727

Please sign in to comment.