Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-5403

Struts 2.5 to 6.x migration issues caused by removal of deprecated code within a minor release

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.4.0
    • Core
    • None

    Description

      Created this Jira to represent the additional discussion in WW-5251 because there appears to be some breaking changes that could prevent Struts users from being able to successfully migrate to 6.x. Since these are the result of other tickets the discussion should be moved to a new Jira.

      Text from my comments in WW-5251 which results in breaking changes, removal of deprecated methods, in a minor version update of the major version that introduced the deprecations.

      This poses a possible risk to consumers of Struts who may need to attempt an upgrade to 6.x when 2.5 goes out of support in early 2024.

       

      --------

      I've started building our application locally and now hitting various compile issues, in our code, from WW-5304 (and others) . Specifically, at the moment, core/src/main/java/com/opensymphony/xwork2/ActionContext.java dropped getName() which wasn't marked as deprecated. Looks like `org.apache.struts2.interceptor.NoParameters` was also removed. I'm still working though building our app, one fail at a time.

      Should these deprecations been dropped in minor releases as many were initially marked as deprecated in 6.0.0 with WW-4789 WW-3788 (and any others as I find them)?

      I was able to get our app built, and started and light smoke test, and still maintain compatibility with our sister project (might not be the case with every Struts consumer though). Had to make the following additional adjustments to get from 6.1.2.2 to ~6.4.0.0 WW-5251 revert branch:

      • ActionContext.getContext().getName() -> ActionContext.getContext().getActionName()
      • org.apache.struts2.interceptor.NoParameters -> org.apache.struts2.action.NoParameters
        • The action version does not exist in 6.1.2.2
      • actionInvocation.getInvocationContext().setParameters(HttpParameters.create(parameters).build()) ->             actionInvocation.getInvocationContext().withParameters(HttpParameters.create(parameters).build())
      • Caffeine jar is now a required dependency 

      Attachments

        Activity

          People

            Unassigned Unassigned
            brianandle Brian Andle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: