-
Notifications
You must be signed in to change notification settings - Fork 101
Update AddStaticVariableOnProducerSessionBean to modify XML defined EJBs #765
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
Update AddStaticVariableOnProducerSessionBean to modify XML defined EJBs #765
Conversation
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
@timtebeek Could we also get @karthikNousher added to the IBM team? Thanks! |
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBeanTest.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.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.
Hey Karthik, could you look though my comments from the last review? Several did not get addressed, such as:
- Using a
Set
instead of aMap
as the accumulator - Checking for
ejb-jar.xml
in a precondition for the scanner (this is more efficient thanvisitDocument
) - Ensuring that the scanner is only executing on tags with this path
ejb-jar/enterprise-beans/session
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java
Outdated
Show resolved
Hide resolved
…ProducerSessionBean.java
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.
Looks good to me. I think you are ready to have someone from the OpenRewrite team take a look.
Thanks both! Neat addition to cover these cases as well, and perfect use of a ScanningRecipe to do so. |
import org.openrewrite.java.tree.JavaType; | ||
import org.openrewrite.java.tree.Space; |
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.
import org.openrewrite.java.tree.JavaType; | |
import org.openrewrite.java.tree.Space; | |
import org.openrewrite.java.tree.Space; |
What's changed?
ejb-jar.xml
fileWhat's your motivation?
@Stateless
,@Stateful
, or@Singleton
, but also to those defined in the xml file.Any additional context
ejb-jar.xml
for session bean definitions and incorporate these beans in the recipe processing.@Stateless
,@Stateful
, or@Singleton
annotation but are specified as session beans in the XML configuration.
Checklist