-
Notifications
You must be signed in to change notification settings - Fork 11
New Recipe to use java.time api instead of @Temporal annotation #102
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
base: main
Are you sure you want to change the base?
Conversation
src/main/java/org/openrewrite/quarkus/RefactorTemporalAnnotation.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/quarkus/RefactorTemporalAnnotation.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/quarkus/RefactorTemporalAnnotation.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/quarkus/RefactorTemporalAnnotationTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/quarkus/RefactorTemporalAnnotationTest.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/quarkus/RefactorTemporalAnnotation.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/quarkus/RefactorTemporalAnnotationTest.java
Outdated
Show resolved
Hide resolved
|
hi @FredMencier ; thanks for the contribution! I've polished up the implementation and tests a bit. Wondering mostly how you'd plan to handle any fall out from running this recipe, as changing the type in entity classes is likely to have knock on effects that would need further changes. Any thoughts you can share there? |
|
Hi Tim, thanks for your review. |
If we were to include it here I think indeed we should strive for a complete migration, as the context of manual work being needed might be lost on folks that stumble across this recipe. Such cascading type changes would require a scanning recipe, to first identify which types would be changed, and then from there make the necessary code changes (possibly using adapters) as needed. If the recipe is already usable to you all in the current form then it's also fine not to contribute it just yet, and keep it internal. Happy to help review and think through the options even if we can't yet merge this with confidence here. |
|
This PR is stale because it has been open for 90 days with no activity. Remove |
What's changed?
Add a new recipe to remove
@Temporalannotation when using java.util.Date and convert type with java.time apiWhat's your motivation?
Prefer using java.time api in persistence layer
Anything in particular you'd like reviewers to focus on?
Maybe this recipe can be used not only in quarkus context
Anyone you would like to review specifically?
@timtebeek
Have you considered any alternatives or workarounds?
Yes, looking for existing recipe but not found
Any additional context
no
Checklist