Skip to content
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

WW-3714 Ensure correct delegation of deprecated API methods #1117

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

kusalk
Copy link
Member

@kusalk kusalk commented Nov 3, 2024

WW-3714

Whilst working on #1116, I noticed a minor issue with how overriding of classes that implement the old/deprecated Result/Interceptor interfaces behave.

Currently, if an application extends for example, org.apache.struts2.result.HttpHeaderResult and overrides the new signature void execute(org.apache.struts2.ActionInvocation invocation) instead of the old one void execute(com.opensymphony.xwork2.ActionInvocation invocation) - this override will have no effect.

The changes in this PR ensure the override will function as expected irrespective of whether the old or new signature is overridden. This works because the default implementation for the new signature in the old/deprecated interfaces is to delegate to the old signature.

@kusalk kusalk force-pushed the WW-3714-overriding-behaviour branch from 57e08fb to be82a72 Compare November 3, 2024 00:47
@kusalk kusalk marked this pull request as ready for review November 3, 2024 00:52
Copy link

sonarcloud bot commented Nov 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
56.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Base automatically changed from WW-5459-repkg-action-chain-2 to master November 3, 2024 07:53
@kusalk kusalk merged commit 1e2517b into master Nov 3, 2024
8 of 9 checks passed
@kusalk kusalk deleted the WW-3714-overriding-behaviour branch November 3, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants