-
Notifications
You must be signed in to change notification settings - Fork 212
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
main: Update dependency com.google.errorprone:error_prone_core to v2.37.0 #1213
Open
renovate-bot
wants to merge
1
commit into
apache:main
Choose a base branch
from
renovate-bot:renovate/main/com.google.errorprone-error_prone_core-2.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
main: Update dependency com.google.errorprone:error_prone_core to v2.37.0 #1213
renovate-bot
wants to merge
1
commit into
apache:main
from
renovate-bot:renovate/main/com.google.errorprone-error_prone_core-2.x
Conversation
This file contains 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
snazy
approved these changes
Mar 19, 2025
snazy
added a commit
to snazy/polaris
that referenced
this pull request
Mar 19, 2025
This change is required for apache#1213 From [CI](https://github.com/apache/polaris/actions/runs/13952639581/job/39055890829]: ``` /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:188: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. (baseCatalog instanceof SupportsNamespaces) ? (SupportsNamespaces) baseCatalog : null; ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean '(baseCatalog instanceof SupportsNamespaces supportsNamespaces) ? supportsNamespaces : null;'? /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:189: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. this.viewCatalog = (baseCatalog instanceof ViewCatalog) ? (ViewCatalog) baseCatalog : null; ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean 'this.viewCatalog = (baseCatalog instanceof ViewCatalog viewCatalog) ? viewCatalog : null;'? > Task :polaris-service-common:compileJava /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:676: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. if (baseCatalog instanceof BasePolarisCatalog) { ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean 'if (baseCatalog instanceof BasePolarisCatalog basePolarisCatalog) {'? /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:899: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. if (baseCatalog instanceof BasePolarisCatalog ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean 'if (baseCatalog instanceof BasePolarisCatalog basePolarisCatalog'? /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:900: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. && update instanceof MetadataUpdate.SetLocation) { ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean '&& update instanceof MetadataUpdate.SetLocation setLocation) {'? /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:1022: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. if (!(baseCatalog instanceof BasePolarisCatalog)) { ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean 'if (!(baseCatalog instanceof BasePolarisCatalog basePolarisCatalog)) {'? /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:1039: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. if (!(table instanceof BaseTable)) { ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean 'if (!(table instanceof BaseTable baseTable)) {'? /home/runner/work/polaris/polaris/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java:1064: error: [PatternMatchingInstanceof] This code can be simplified to use a pattern-matching instanceof. if (singleUpdate instanceof MetadataUpdate.SetLocation) { ^ (see https://errorprone.info/bugpattern/PatternMatchingInstanceof) Did you mean 'if (singleUpdate instanceof MetadataUpdate.SetLocation setLocation) {'? ```
snazy
added a commit
to snazy/polaris
that referenced
this pull request
Mar 21, 2025
Also enabled a couple more simple rules, and adding suppressions/fixes for/to the code. The two rules `EqualsGetClass` and `UnusedMethod`, which I think are useful, are not enabled yet, because that would mean actual code changes, which I do not want to do in this PR. The rule `PatternMatchingInstanceof`, introduced in apache#393, is disabled in this PR. It does not work before errorrpone 2.37.0 (via apache#1213) - requires additional changes to enable the rule (see apache#1215).
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 PR contains the following updates:
2.36.0
->2.37.0
Release Notes
google/error-prone (com.google.errorprone:error_prone_core)
v2.37.0
: Error Prone 2.37.0Changes:
error_prone_type_annotations
have been been merged intoerror_prone_annotations
.error_prone_type_annotations
is now deprecated, and will be removed in a future release.New checks:
AssignmentExpression
- The use of an assignment expression can be surprising and hard to read; consider factoring out the assignment to a separate statement.IntFloatConversion
- Detect calls toscalb
that should be using the double overload insteadInvalidSnippet
- Detects snippets which omit the:
required for inline code.JUnit4EmptyMethods
- Detects empty JUnit4@Before
,@After
,@BeforeClass
, and@AfterClass
methods.MockIllegalThrows
- Detects cases where Mockito is configured to throw checked exception types which are impossible.NegativeBoolean
- Prefer positive boolean names.RuleNotRun
- DetectsTestRule
s not annotated with@Rule
, that won't be run.StringConcatToTextBlock
- Replaces concatenated multiline strings with text blocks.TimeInStaticInitializer
- Detects accesses of the system time in static contexts.Closed issues:
@InlineMe
patching ofStrings.repeat
produces broken code (#4819)_
) variables (#4847)Full changelog: google/error-prone@v2.36.0...v2.37.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.