Recipe Name:
DateTimeFormatter deprecated getChronolgy
Description:
DateTimeFormatter deprecated getChronolgy
Level:
error
Language:
- java
Tags:
- framework specific
- java.time
- Joda-Time
- quality
Documentation
Migrate from org.joda.time.DateTimeFormatter to Java Time
Joda-Time DateTimeFormatter migrates to java.time DateTimeFormatter.
It's a same concept, an immutable formatter
BeforeDateTimeFormatter dtf = DateTimeFormat.fullDate();After
java.time.format.DateTimeFormatter dtf = java.time.format.DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);References
Recipe
id: scw:java.time:Joda-Time:datetimeformatter-chronolgy version: 10 metadata: name: DateTimeFormatter deprecated getChronolgy shortDescription: DateTimeFormatter deprecated getChronolgy level: error language: java enabled: true descriptionFile: Java/JodaTimeToJavaTime/DateTimeFormatter/descriptions/datetimeformatter.html tags: framework specific;java.time;Joda-Time;quality search: methodcall: name: getChronolgy type: java.time.format.DateTimeFormatter availableFixes: - name: Rewrite to getChronology() actions: - rewrite: to: '{{{ qualifier }}}.getChronology()'