Skip to content
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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate-bot
Copy link
Collaborator

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.google.errorprone:error_prone_core (source) 2.36.0 -> 2.37.0 age adoption passing confidence

Release Notes

google/error-prone (com.google.errorprone:error_prone_core)

v2.37.0: Error Prone 2.37.0

Changes:

  • The annotations that were previously in error_prone_type_annotations have been been merged into error_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 to scalb that should be using the double overload instead
  • InvalidSnippet - 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 - Detects TestRules 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:

  • Propagate check flags in patch mode (#​4699)
  • Fixes a crash in ComputeIfAbsentAmbiguousReference (#​4736)
  • Show the field name in HidingField diagnostics (#​4775)
  • Add support for jakarta annotations to some checks (#​4782)
  • FloatingPointAssertionWithinEpsilonTest depends on default locale (#​4815)
  • @InlineMe patching of Strings.repeat produces broken code (#​4819)
  • Fix a crash in IdentifierName on unnamed (_) variables (#​4847)
  • Fix a crash in ArgumentParameterSwap (#​490)

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants