-
Notifications
You must be signed in to change notification settings - Fork 106
[Junie]: feat: implement recipe for constructor injection conversion #726
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?
[Junie]: feat: implement recipe for constructor injection conversion #726
Conversation
A new recipe was implemented to convert Spring field injection to constructor injection, handling `@Autowired` and `@Qualifier` annotations. The tests initially failed due to formatting issues and handling of existing constructors, but modifications were made to address these problems. The updated recipe is now being tested in hopes of achieving the desired functionality correctly.
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.
Some suggestions could not be made:
- build.gradle.kts
- lines 147-146
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjection.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjection.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjection.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjection.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjection.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionSimple.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionSimple.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionTest.java
Outdated
Show resolved
Hide resolved
@jetbrains-junie Note that most of the new tests are failing. For types referenced from Java source files in tests (using |
Hey, it’s Junie by JetBrains! I started processing your request 🚀 |
A pull request updated classpath dependencies to `classpathFromResources()` for tests converting Spring field injection to constructor injection. Despite these changes, seven tests failed due to formatting discrepancies and issues with annotation recognition. Further adjustments are needed to resolve these failures.
A pull request updated classpath dependencies to |
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.
Some suggestions could not be made:
- build.gradle.kts
- lines 147-146
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjection.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionFinal.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionSimple.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/FieldInjectionToConstructorInjectionSimple.java
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…46d4-a43d-861be8c08f2d
@knutwannheden What would we want to do with this PR? There's parallel classes doing the same thing. Should we consolidate and attempt to get this merged? Or just abandon and try again with Claude? |
📌 Hey! This PR was made for you with Junie, the coding agent by JetBrains Early Access Preview
It's still learning, developing, and might make mistakes. Please make sure you review the changes before you accept them.
We’d love your feedback — join our Discord to share bugs, ideas: here.
📊 Junie Summary
A new recipe was implemented to convert Spring field injection to constructor injection, handling
@Autowired
and@Qualifier
annotations. The tests initially failed due to formatting issues and handling of existing constructors, but modifications were made to address these problems. The updated recipe is now being tested in hopes of achieving the desired functionality correctly.