spring-projects / spring-data-redis

Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-redis/
Apache License 2.0
1.77k stars 1.17k forks source link

Refactor Tests to `instanceof` pattern variable #2971

Closed arefbehboudi closed 3 months ago

arefbehboudi commented 3 months ago

In some of our test cases, we are currently using 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.

issues

mp911de commented 3 months ago

Thank you for your contribution. That's merged, polished, and backported now.