WW-3714 Deprecate and repackage common APIs part 2 #1081
Merged
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.
WW-3714
This PR deprecates and provides repackaged replacements for the following APIs, ahead of their permanent migration in Struts 7.0:
com.opensymphony.xwork2.ActionInvocation
com.opensymphony.xwork2.interceptor.PreResultListener
Full backwards compatibility with the deprecated types are retained - I achieved this by doing the following:
Another variation of this approach that is sometimes employed is to have the new class extend the deprecated one instead. I deliberately avoided this as it pollutes the new/replacement class with compatibility code and references to deprecated types. I'd prefer compatibility code to appear in the deprecated class instead, to avoid confusion for anyone inspecting the bytecode/source of the APIs.
Additionally, this approach usually facilitates much more straightforward deletion of the deprecated classes when ready. However, in this case, this point is moot as the deletion PR for Struts 7.0 has already been prepared. We can simply discard all changes in my series of deprecation PRs when we merge them forward from
master
torelease/struts-7-0-x
.