This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/struts.git
commit 1d9342033de62ca470e38d893bde57b4c62a5f9a Author: Lukasz Lenart <[email protected]> AuthorDate: Sun Oct 25 19:21:53 2026 +0100 WW-5811 refactor(html5): make the null action check explicit for Sonar S2259 Co-Authored-By: Claude Opus 5.5 <[email protected]> --- core/src/main/java/org/apache/struts2/components/Form.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/struts2/components/Form.java b/core/src/main/java/org/apache/struts2/components/Form.java index ba9a84d0e..a8b481d65 100644 --- a/core/src/main/java/org/apache/struts2/components/Form.java +++ b/core/src/main/java/org/apache/struts2/components/Form.java @@ -467,7 +467,7 @@ public class Form extends ClosingUIBean { return Collections.emptyList(); } Object invoked = currentAction(); - if (!actionClass.isInstance(invoked)) { + if (invoked == null || !actionClass.isInstance(invoked)) { return ModelDriven.class.isAssignableFrom(actionClass) ? Collections.emptyList() : Collections.singletonList(actionClass); }
