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

SOLR-16427: Enable error-prone PatternMatchingInstanceof rule #2867

Merged

Conversation

malliaridis
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-16427

Description

With the new errorprone rules and starting from 16+ we can use pattern-matching for instanceof.

Solution

This PR enables PatternMatchingInstanceof and applies auto-refactoring from IntelliJ for pattern-matching cases.

Note that these changes are not backwards compatible (branch_9x) as the refactored code makes use of a JDK 16 feature.

Tests

No tests were added or removed. Tests with pattern-matching improvements were refactored accordingly.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

@malliaridis
Copy link
Contributor Author

Waiting for #2877 to rerun the checks and merge afterwards.

@malliaridis malliaridis merged commit b76a29d into apache:main Nov 20, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment