Skip to content

Refactor Code with instanceof Pattern Variable #1868

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

Closed
wants to merge 1 commit into from

Conversation

arefbehboudi
Copy link
Contributor

In some cases, we currently use the traditional instanceof checks followed by explicit type casting. With the introduction of Pattern Matching in recent Java versions, we can refactor these checks to make the code more concise and readable.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 29, 2024
@arefbehboudi arefbehboudi changed the title Refactor Code with instanceof Pattern Variable: Refactor Code with instanceof Pattern Variable Aug 30, 2024
schauder pushed a commit that referenced this pull request Aug 30, 2024
In some cases, we currently use the traditional `instanceof` checks followed by explicit type casting.
With the introduction of pattern matching in recent Java versions, we can refactor these checks to make the code more concise and readable.

Original pull request #1868
schauder pushed a commit that referenced this pull request Aug 30, 2024
In some cases, we currently use the traditional `instanceof` checks followed by explicit type casting.
With the introduction of pattern matching in recent Java versions, we can refactor these checks to make the code more concise and readable.

Original pull request #1868
schauder pushed a commit that referenced this pull request Aug 30, 2024
In some cases, we currently use the traditional `instanceof` checks followed by explicit type casting.
With the introduction of pattern matching in recent Java versions, we can refactor these checks to make the code more concise and readable.

Original pull request #1868
@schauder schauder self-assigned this Aug 30, 2024
@schauder
Copy link
Contributor

Thanks that's merged.

@schauder schauder closed this Aug 30, 2024
@schauder schauder added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 30, 2024
@schauder schauder added this to the 3.2.10 (2023.1.10) milestone Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants