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

Add new feature to convert pattern instanceof to switch #1972

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

jjohnstn
Copy link
Contributor

What it does

See issue.

How to test

See issue or new tests.

Author checklist

- add new PatternInstanceofToSwitchCleanUpCore and
  PatternInstanceofToSwitchFixCore classes to convert
  a nesting if statement using pattern instanceof expressions
  into either a switch statement or switch expression if possible
- add new cleanup to JavaFeatureTabPage, plugin, and CleanUpConstants
- add rtstubs_21.jar for testing
- add new CleanUpTest21 class and add tests for new feature
- fixes eclipse-jdt#1919
@jjohnstn jjohnstn self-assigned this Jan 24, 2025
@jjohnstn jjohnstn added enhancement New feature or request noteworthy Noteworthy feature labels Jan 24, 2025
@jjohnstn jjohnstn added this to the 4.35 M2 milestone Jan 24, 2025
@jjohnstn
Copy link
Contributor Author

Compiler tools issues have nothing to do with this patch.

@jjohnstn jjohnstn merged commit 8c58ba0 into eclipse-jdt:master Jan 24, 2025
7 of 10 checks passed
@jjohnstn jjohnstn deleted the ifinstancecleanup branch January 24, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request noteworthy Noteworthy feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup/Refactor: if-else-chains to pattern-matching-switch (if only instanceof checks used)
1 participant