This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5770-scoped-convention-result-path
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to 
refs/heads/WW-5770-scoped-convention-result-path by this push:
     new df4a7b6be WW-5770 chore: address review comments
df4a7b6be is described below

commit df4a7b6bef434b5bb1258ad5f979921aa3b9b113
Author: Lukasz Lenart <[email protected]>
AuthorDate: Wed Oct 14 08:14:56 2026 +0200

    WW-5770 chore: address review comments
    
    Drop the inert convention-default redeclaration from the test fixture,
    narrow the @throws of the default getValue(String, PackageConfig),
    and mark the design as implemented.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../main/java/org/apache/struts2/config/ScopedConstantProvider.java    | 3 ++-
 .../specs/2026-10-14-WW-5770-scoped-convention-result-path-design.md   | 2 +-
 .../src/test/resources/struts-convention-scoped-result-path.xml        | 2 --
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/core/src/main/java/org/apache/struts2/config/ScopedConstantProvider.java 
b/core/src/main/java/org/apache/struts2/config/ScopedConstantProvider.java
index d8ebf1202..5148cfce5 100644
--- a/core/src/main/java/org/apache/struts2/config/ScopedConstantProvider.java
+++ b/core/src/main/java/org/apache/struts2/config/ScopedConstantProvider.java
@@ -40,7 +40,8 @@ public interface ScopedConstantProvider {
      * @param packageConfig the package whose scoped constants, inherited ones 
included, take precedence; may be
      *                      {@code null}
      * @return the package's scoped value, or else {@link #getValue(String)}
-     * @throws IllegalArgumentException when {@code name} is not scopable
+     * @throws IllegalArgumentException when {@code name} is not scopable; 
this default checks only on the
+     *                                  {@link #getValue(String)} fallback, as 
package values were validated at startup
      * @since 7.5.0
      */
     default String getValue(String name, PackageConfig packageConfig) {
diff --git 
a/docs/superpowers/specs/2026-10-14-WW-5770-scoped-convention-result-path-design.md
 
b/docs/superpowers/specs/2026-10-14-WW-5770-scoped-convention-result-path-design.md
index d4c5db539..f0ef78243 100644
--- 
a/docs/superpowers/specs/2026-10-14-WW-5770-scoped-convention-result-path-design.md
+++ 
b/docs/superpowers/specs/2026-10-14-WW-5770-scoped-convention-result-path-design.md
@@ -3,7 +3,7 @@
 **Ticket:** [WW-5770](https://issues.apache.org/jira/browse/WW-5770) — *Make 
struts.convention.result.path scopable per package*
 **Target:** 7.5.0 (ticket fix version)
 **Date:** 2026-10-14
-**Status:** Design approved, pending implementation plan
+**Status:** Implemented — [PR 
#2009](https://github.com/apache/struts/pull/2009)
 
 ## Problem
 
diff --git 
a/plugins/convention/src/test/resources/struts-convention-scoped-result-path.xml
 
b/plugins/convention/src/test/resources/struts-convention-scoped-result-path.xml
index 118250ea6..706c668f2 100644
--- 
a/plugins/convention/src/test/resources/struts-convention-scoped-result-path.xml
+++ 
b/plugins/convention/src/test/resources/struts-convention-scoped-result-path.xml
@@ -28,8 +28,6 @@
     <constant name="struts.convention.result.path" value="/"/>
     <constant name="struts.convention.default.parent.package" 
value="scoped-default"/>
 
-    <package name="convention-default" extends="struts-default"/>
-
     <package name="scoped-default" extends="convention-default">
         <scoped-constant name="struts.convention.result.path" 
value="/scoped/"/>
     </package>

Reply via email to