-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump versions.errorprone from 2.10.0 to 2.12.1 #2608
Bump versions.errorprone from 2.10.0 to 2.12.1 #2608
Conversation
Bumps `versions.errorprone` from 2.10.0 to 2.11.0. Updates `error_prone_core` from 2.10.0 to 2.11.0 - [Release notes](https://github.com/google/error-prone/releases) - [Commits](google/error-prone@v2.10.0...v2.11.0) Updates `error_prone_test_helpers` from 2.10.0 to 2.11.0 - [Release notes](https://github.com/google/error-prone/releases) - [Commits](google/error-prone@v2.10.0...v2.11.0) --- updated-dependencies: - dependency-name: com.google.errorprone:error_prone_core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.google.errorprone:error_prone_test_helpers dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This also fixes mockito#2554, by using `.withNoParameters()` instead.
For some reason, Java 8 chooses the wrong subclass for this specific use case. All other assertions are fine and this doesn't happen on JDK 11. Therefore, let's extract it into a method to force the correct type.
@@ -24,7 +25,7 @@ public boolean matches(Number actual) { | |||
return false; | |||
} | |||
|
|||
if (wanted == actual) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old code was not incorrect due to the subsequent range check. An alternative to this change would be to suppress the DoubleBraceInitialization check on this method. However, simply using .equals
is likely less surprising.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, but can you please update the base branch to main
so that I can cleanly merge this PR? Then we can close #2553 as well.
Codecov Report
@@ Coverage Diff @@
## main #2608 +/- ##
============================================
+ Coverage 86.71% 86.77% +0.06%
+ Complexity 2784 2762 -22
============================================
Files 320 315 -5
Lines 8341 8275 -66
Branches 1021 1027 +6
============================================
- Hits 7233 7181 -52
+ Misses 840 831 -9
+ Partials 268 263 -5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes!
@TimvdLippe would it be possible to get a Maven Central release with these changes? As-is we're blocked from upgrading Error Prone (unless we disable |
@Stephan202 We are working on #2613 and will publish a new minor release including that PR. |
4.5.0 is now available on Maven Central: https://repo1.maven.org/maven2/org/mockito/mockito-core/4.5.0/ |
Fixes #2554.
Today ErrorProne 2.12.0 has been released. It contains google/error-prone#2926, which fixes the incompatibility issue for Mockito.
We are blocked internally on the new Mockito release and therefore decided to help out and open this PR.
I'm open to other ideas on how to improve the code.
Bumps
versions.errorprone
from 2.10.0 to 2.12.1.Updates
error_prone_core
from 2.10.0 to 2.12.1Updates
error_prone_test_helpers
from 2.10.0 to 2.12.1updated-dependencies:
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-type: direct:production
update-type: version-update:semver-minor
...