Skip to content

Modernize Switch Statements with JDK 21 Patterns #3708

@UrbanBobek

Description

@UrbanBobek

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions