Skip to content

Commit cf508b7

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Bump Error Prone to 2.36.0, including setting --should-stop=ifError=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: 700392786
1 parent 74c75ca commit cf508b7

File tree

5 files changed

+12
-20
lines changed

5 files changed

+12
-20
lines changed

android/guava-tests/test/com/google/common/math/DoubleMathTest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,8 @@ public void testRoundLog2Half() {
356356
for (RoundingMode mode : asList(HALF_EVEN, HALF_UP, HALF_DOWN)) {
357357
double x = Math.scalb(Math.sqrt(2) + 0.001, exp);
358358
double y = Math.scalb(Math.sqrt(2) - 0.001, exp);
359-
if (exp < 0) {
360-
assertEquals(exp + 1, DoubleMath.log2(x, mode));
361-
assertEquals(exp, DoubleMath.log2(y, mode));
362-
} else {
363-
assertEquals(exp + 1, DoubleMath.log2(x, mode));
364-
assertEquals(exp, DoubleMath.log2(y, mode));
365-
}
359+
assertEquals(exp + 1, DoubleMath.log2(x, mode));
360+
assertEquals(exp, DoubleMath.log2(y, mode));
366361
}
367362
}
368363
}

android/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<truth.version>1.4.4</truth.version>
2424
<jsr305.version>3.0.2</jsr305.version>
2525
<checker.version>3.43.0</checker.version>
26-
<errorprone.version>2.28.0</errorprone.version>
26+
<errorprone.version>2.36.0</errorprone.version>
2727
<j2objc.version>3.0.0</j2objc.version>
2828
<!-- Empty for all JDKs but 9-12 -->
2929
<maven-javadoc-plugin.additionalJOptions></maven-javadoc-plugin.additionalJOptions>
@@ -144,6 +144,7 @@
144144
<arg>doesnotexist</arg>
145145
<!-- https://errorprone.info/docs/installation#maven -->
146146
<arg>-XDcompilePolicy=simple</arg>
147+
<arg>--should-stop=ifError=FLOW</arg>
147148

148149
<!-- https://errorprone.info/docs/installation#maven -->
149150
<!-- TODO(cpovirk): Enable NullArgumentForNonNullParameter for
@@ -173,7 +174,7 @@
173174
<path>
174175
<groupId>com.google.errorprone</groupId>
175176
<artifactId>error_prone_core</artifactId>
176-
<version>2.33.0</version>
177+
<version>2.36.0</version>
177178
</path>
178179
</annotationProcessorPaths>
179180
<!-- Fork because we need args like add-exports. (But see the TODO above about .mvn/jvm.config.) -->

guava-tests/test/com/google/common/math/DoubleMathTest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,8 @@ public void testRoundLog2Half() {
356356
for (RoundingMode mode : asList(HALF_EVEN, HALF_UP, HALF_DOWN)) {
357357
double x = Math.scalb(Math.sqrt(2) + 0.001, exp);
358358
double y = Math.scalb(Math.sqrt(2) - 0.001, exp);
359-
if (exp < 0) {
360-
assertEquals(exp + 1, DoubleMath.log2(x, mode));
361-
assertEquals(exp, DoubleMath.log2(y, mode));
362-
} else {
363-
assertEquals(exp + 1, DoubleMath.log2(x, mode));
364-
assertEquals(exp, DoubleMath.log2(y, mode));
365-
}
359+
assertEquals(exp + 1, DoubleMath.log2(x, mode));
360+
assertEquals(exp, DoubleMath.log2(y, mode));
366361
}
367362
}
368363
}

integration-tests/gradle/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ val expectedReducedRuntimeClasspathAndroidVersion =
1111
"j2objc-annotations-3.0.0.jar",
1212
"jsr305-3.0.2.jar",
1313
"checker-qual-3.43.0.jar",
14-
"error_prone_annotations-2.28.0.jar",
14+
"error_prone_annotations-2.36.0.jar",
1515
"listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"
1616
)
1717
val expectedReducedRuntimeClasspathJreVersion =
@@ -21,7 +21,7 @@ val expectedReducedRuntimeClasspathJreVersion =
2121
"j2objc-annotations-3.0.0.jar",
2222
"jsr305-3.0.2.jar",
2323
"checker-qual-3.43.0.jar",
24-
"error_prone_annotations-2.28.0.jar",
24+
"error_prone_annotations-2.36.0.jar",
2525
"listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"
2626
)
2727
val expectedCompileClasspathAndroidVersion = expectedReducedRuntimeClasspathAndroidVersion

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<truth.version>1.4.4</truth.version>
2424
<jsr305.version>3.0.2</jsr305.version>
2525
<checker.version>3.43.0</checker.version>
26-
<errorprone.version>2.28.0</errorprone.version>
26+
<errorprone.version>2.36.0</errorprone.version>
2727
<j2objc.version>3.0.0</j2objc.version>
2828
<!-- Empty for all JDKs but 9-12 -->
2929
<maven-javadoc-plugin.additionalJOptions></maven-javadoc-plugin.additionalJOptions>
@@ -145,6 +145,7 @@
145145
<arg>doesnotexist</arg>
146146
<!-- https://errorprone.info/docs/installation#maven -->
147147
<arg>-XDcompilePolicy=simple</arg>
148+
<arg>--should-stop=ifError=FLOW</arg>
148149

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

0 commit comments

Comments
 (0)