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:
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.
Resources: