-
Notifications
You must be signed in to change notification settings - Fork 77
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
Joda-Time to Java time: Add templates for Joda Interval to Threeten-extra Interval #617
Conversation
…Threeten-Extra Interval
src/main/java/org/openrewrite/java/migrate/joda/templates/AbstractIntervalTemplates.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/joda/templates/AbstractIntervalTemplates.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/joda/templates/AbstractIntervalTemplates.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/joda/templates/IntervalTemplates.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/joda/templates/IntervalTemplates.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/joda/templates/IntervalTemplates.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/joda/templates/TimeClassNames.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/migrate/joda/JodaTimeVisitorTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/migrate/joda/JodaTimeVisitorTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see! the only thing I'm wondering is if there should be a declarative recipe to add that threeten-extra
dependency if not already present (transitively). Just to ensure there's no compilation failures due to a missing dependency after the migration.
import static org.openrewrite.java.Assertions.*; | ||
import static org.openrewrite.maven.Assertions.pomXml; | ||
|
||
public class NoJodaTimeTest implements RewriteTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class NoJodaTimeTest implements RewriteTest { | |
class NoJodaTimeTest implements RewriteTest { |
I’ve added a declarative recipe with AddDependency. Also added test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot once again!
What's changed?
Added migration templates to convert Joda-Time Interval classes to the ThreeTen-extra Interval. The Interval class is not part of the JDK but is implemented in ThreeTen-extra, built on top of Java's java.time classes. This change include migration templates for methods from the following Joda-Time classes:
What's your motivation?
Increase coverage for Joda-Time to Java Time migration recipe by adding support for additional classes.
Checklist