chore: add ErrorProne verification to catch bugs ealier#3493
Merged
vlsi merged 12 commits intopgjdbc:masterfrom Jan 28, 2025
Merged
chore: add ErrorProne verification to catch bugs ealier#3493vlsi merged 12 commits intopgjdbc:masterfrom
vlsi merged 12 commits intopgjdbc:masterfrom
Conversation
91c5e2c to
6290ef3
Compare
Member
|
cool, great idea |
55fd558 to
8e1d1d9
Compare
Member
Author
|
It looks like this is finalized. In practice, errorprone does not significantly increase the build time, so it might be worth running it on every build. WDYT? Currently, I configured it so it executes errorpone only when explicitly asked (e.g. |
Member
|
Thanks, this looks like it will clean up a lot of things. |
Member
Author
Just for the reference, ErrorProne does not fix issues. It only reports them and suggests fixes. For example: |
davecramer
approved these changes
Jan 25, 2025
Member
|
That's a lot of work! Thanks |
Even though we do not suggest using Fastpath, there's no rush to replace it with something else Note: javac produces deprecation warnings when building with --release 8, so we have to use fully-qualified imports when using deprecated classes/interfaces
…N and OffsetDateTime.MAX
Errorprone complains on empty catch blocks, and it looks it is worth adding the relevant comments in such cases.
It is still useful (e.g. when parsing the version provided by the backend)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds verifications from error-prone so we could catch errors earlier.
I suggest we fail the build on javac warnings as well.
However, we could probably live with warnings in the test code. Otherwise there will be a lot of warnings when testing deprecated classes. As we deprecate method, the test code should better be intact so it ensures the behavior is kept.