-
Notifications
You must be signed in to change notification settings - Fork 125
Modernize Switch Statements with JDK 21 Patterns #3708
Copy link
Copy link
Open
Description
Refactor legacy switch statements throughout Phoebus codebase to use JDK 21 modern switch expressions and pattern matching. Improve code readability and take advantage of exhaustiveness checking.
- Identify switch statements that can benefit from JDK 21 pattern matching
- Convert traditional switch statements to switch expressions where appropriate
- Use pattern matching for instanceof checks in switch cases
- Ensure exhaustiveness checking is leveraged
- Add tests to verify behavior remains unchanged
Resources:
- JDK 21 Pattern Matching: https://openjdk.org/jeps/441
- Switch Pattern Matching: https://docs.oracle.com/en/java/javase/21/language/pattern-matching.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels