-
Notifications
You must be signed in to change notification settings - Fork 7
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
Migrate from extending EmptyInterceptor
to implementing Interceptor
/StatementInspector
#39
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…yInterceptor to implements Interceptor/StatementInspector
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/hibernate/EmptyInterceptorToInterfaceTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/hibernate/EmptyInterceptorToInterfaceTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
timtebeek
reviewed
Sep 30, 2024
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Sep 30, 2024
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Sep 30, 2024
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Outdated
Show resolved
Hide resolved
Instead of autoformat, apply correct padding
timtebeek
reviewed
Oct 6, 2024
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Tim te Beek <[email protected]>
src/main/java/org/openrewrite/hibernate/EmptyInterceptorToInterface.java
Show resolved
Hide resolved
timtebeek
approved these changes
Oct 8, 2024
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 this resolved ; I've pushed up a small polishing commit, but otherwise good to merge.
Comment on lines
+28
to
+29
import org.openrewrite.java.tree.*; | ||
|
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.
Suggested change
import org.openrewrite.java.tree.*; | |
import org.openrewrite.java.tree.J; | |
import org.openrewrite.java.tree.JavaType; | |
import org.openrewrite.java.tree.Space; | |
import org.openrewrite.java.tree.TypeTree; | |
import org.openrewrite.java.tree.TypeUtils; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's changed?
Added recipe to go from
extends EmptyInterceptor
toimplements Interceptor
and potentiallyStatementInspector
too.Create declarative hibernate 6_0 recipe and move things from 6_1 that could/should be done for 6_0 as well.
Anyone you would like to review specifically?
@timtebeek
Any additional context
The
Interceptor
interface received defaults implementations hence why they didn't need a "NOOP" implementation anymorehttps://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/resource/jdbc/spi/StatementInspector.html
https://stackoverflow.com/questions/75172581/error-org-hibernate-emptyinterceptor-is-deprecated-in-sql-statement-intercepto
Checklist