spring-projects / spring-projects/spring-data-couchbase
Refactor to instanceof pattern variable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 284
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
In some of our 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.
Please see https://github.com/spring-projects/spring-data-couchbase/pull/2017
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked pull request at https://github.com/spring-projects/spring-data-couchbase/pull/2017 to identify the affected cases and files. Confirm the refactoring scope there and run the relevant project checks; done means the eligible instanceof checks use pattern variables without changing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100