Migrate Struts 2.0 interceptors to action "aware" interfaces
ProprietaryThese types have moved to a new package in Struts 6.0 and their methods have been renamed from set* to with*.
org. openrewrite. java. struts. migrate6. MigrateAwareInterfacesmod run . --recipe= org. openrewrite. java. struts. migrate6. MigrateAwareInterfacesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Change method name
org.apache.struts2.interceptor.ApplicationAware setApplication(java.util.Map)towithApplication - Change method name
org.apache.struts2.interceptor.SessionAware setSession(java.util.Map)towithSession - Change method name
org.apache.struts2.interceptor.ParameterAware setParameters(java.util.Map)towithParameters - Change method name
org.apache.struts2.interceptor.HttpParametersAware setParameters(org.apache.struts2.dispatcher.HttpParameters)towithParameters - Change method name
org.apache.struts2.interceptor.PrincipalAware setPrincipalProxy(org.apache.struts2.interceptor.PrincipalProxy)towithPrincipalProxy - Change method name
org.apache.struts2.interceptor.ServletRequestAware setServletRequest(javax.servlet.http.HttpServletRequest)towithServletRequest - Change method name
org.apache.struts2.interceptor.ServletResponseAware setServletResponse(javax.servlet.http.HttpServletResponse)towithServletResponse - Change method name
org.apache.struts2.util.ServletContextAware setServletContext(javax.servlet.ServletContext)towithServletContext - Change method name
org.apache.struts2.interceptor.CookiesAware setCookiesMap(java.util.Map)towithCookiesMap - Change method name
org.apache.struts2.interceptor.RequestAware setRequest(java.util.Map)towithRequest - Change type
org.apache.struts2.interceptor.ApplicationAwaretoorg.apache.struts2.action.ApplicationAware - Change type
org.apache.struts2.interceptor.CookiesAwaretoorg.apache.struts2.action.CookiesAware - Change type
HttpParametersAwaretoParametersAware - Change type
ParameterAwaretoParametersAware - Change type
org.apache.struts2.interceptor.PrincipalAwaretoorg.apache.struts2.action.PrincipalAware - Change type
RequestAwaretoServletRequestAware - Change type
org.apache.struts2.interceptor.ServletRequestAwaretoorg.apache.struts2.action.ServletRequestAware - Change type
org.apache.struts2.interceptor.ServletResponseAwaretoorg.apache.struts2.action.ServletResponseAware - Change type
org.apache.struts2.interceptor.SessionAwaretoorg.apache.struts2.action.SessionAware - Change type
org.apache.struts2.util.ServletContextAwaretoorg.apache.struts2.action.ServletContextAware