openrewrite / openrewrite/rewrite-migrate-java
Convert java.text.SimpleDateFormat to java.time.format.DateTimeFormatter
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 156
- Forks
- 130
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 21
Description
It would be nice if there was a recipe that converts java.text.SimpleDateFormat to java.time.format.DateTimeFormatter as DateTimeFormatter is the more modern way.
Also, for applications that incorrectly have SimpleDateFormat it will make them more thread safe.
For those applications that construct SimpleDateFormat inline it would a bonus if it created the DateTimeFormatter as an instance variable as DateTimeFormatter is thread safe.
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
No source files, tests, or entry points are named. Start by locating existing Java migration recipes for similar API changes and determine how inline SimpleDateFormat construction is handled; done means covering the requested conversion and, where applicable, creating a reusable instance variable for the thread-safe formatter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100