Skip to content

Commit

Permalink
WW-5459 Moves ActionChainResult into org.apache.struts2.result package
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Nov 2, 2024
1 parent dd6bb13 commit 83cb936
Show file tree
Hide file tree
Showing 37 changed files with 41 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.struts2.action.Action;
import org.apache.struts2.interceptor.PreResultListener;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.result.Result;
import org.apache.struts2.util.ValueStack;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.apache.struts2.interceptor.PreResultListener;
import org.apache.struts2.interceptor.WithLazyParams;
import org.apache.struts2.ognl.OgnlUtil;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.result.Result;
import org.apache.struts2.util.ValueStack;
import org.apache.struts2.util.ValueStackFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.ActionInvocation;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.Unchainable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2;
package org.apache.struts2.result;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.ActionContext;
import org.apache.struts2.ActionInvocation;
import org.apache.struts2.ActionProxy;
import org.apache.struts2.ActionProxyFactory;
import org.apache.struts2.StrutsException;
import org.apache.struts2.inject.Inject;
import org.apache.struts2.result.Result;
import org.apache.struts2.util.TextParseUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.HashSet;
import java.util.LinkedList;
Expand Down
4 changes: 1 addition & 3 deletions core/src/main/java/org/apache/struts2/result/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
*/
package org.apache.struts2.result;

import org.apache.struts2.Action;
import org.apache.struts2.ActionInvocation;

import org.apache.struts2.action.Action;
import org.apache.struts2.ActionInvocation;

import java.io.Serializable;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/struts-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<package name="struts-default" abstract="true">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult"/>
<result-type name="dispatcher" class="org.apache.struts2.result.ServletDispatcherResult" default="true"/>
<result-type name="freemarker" class="org.apache.struts2.views.freemarker.FreemarkerResult"/>
<result-type name="httpheader" class="org.apache.struts2.result.HttpHeaderResult"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/xwork-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<package name="xwork-default" abstract="true">

<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult"/>
</result-types>
<interceptors>
<interceptor name="logger" class="org.apache.struts2.interceptor.LoggingInterceptor"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.struts2;

import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.result.Result;
import org.junit.Test;

Expand Down
2 changes: 1 addition & 1 deletion core/src/test/java/org/apache/struts2/ChainResultTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import com.mockobjects.dynamic.Mock;
import org.apache.struts2.config.providers.XmlConfigurationProvider;
import org.apache.struts2.mock.MockResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.util.ValueStack;
import junit.framework.TestCase;
import org.apache.struts2.StrutsException;
import org.apache.struts2.config.StrutsXmlConfigurationProvider;

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.struts2.mock.MockActionProxy;
import org.apache.struts2.mock.MockInterceptor;
import org.apache.struts2.mock.MockResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.result.Result;
import org.apache.struts2.util.ValueStack;
import org.apache.struts2.util.ValueStackFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void allowList() throws Exception {
Class.forName("org.apache.struts2.mock.MockResult"),
Class.forName("org.apache.struts2.interceptor.ConditionalInterceptor"),
Class.forName("org.apache.struts2.ActionSupport"),
Class.forName("org.apache.struts2.ActionChainResult"),
Class.forName("org.apache.struts2.result.ActionChainResult"),
Class.forName("org.apache.struts2.TextProvider"),
Class.forName("org.apache.struts2.interceptor.NoOpInterceptor"),
Class.forName("org.apache.struts2.interceptor.Interceptor"),
Expand Down Expand Up @@ -100,7 +100,7 @@ public void allowlist_2only() throws Exception {
Class.forName("java.io.Serializable"),
Class.forName("org.apache.struts2.interceptor.ConditionalInterceptor"),
Class.forName("org.apache.struts2.ActionSupport"),
Class.forName("org.apache.struts2.ActionChainResult"),
Class.forName("org.apache.struts2.result.ActionChainResult"),
Class.forName("org.apache.struts2.TextProvider"),
Class.forName("org.apache.struts2.interceptor.NoOpInterceptor"),
Class.forName("org.apache.struts2.interceptor.Interceptor"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package org.apache.struts2.config.providers;

import org.apache.struts2.action.Action;
import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.ModelDrivenAction;
import org.apache.struts2.ObjectFactory;
import org.apache.struts2.SimpleAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.apache.struts2.config.providers;

import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.SimpleAction;
import org.apache.struts2.config.ConfigurationException;
import org.apache.struts2.config.ConfigurationProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.apache.struts2.config.providers;

import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.config.ConfigurationProvider;
import org.apache.struts2.config.entities.ActionConfig;
import org.apache.struts2.config.entities.InterceptorMapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package org.apache.struts2.config.providers;

import org.apache.struts2.action.Action;
import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.SimpleAction;
import org.apache.struts2.config.ConfigurationException;
import org.apache.struts2.config.ConfigurationProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import com.mockobjects.dynamic.Mock;
import org.apache.struts2.action.Action;
import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.ActionContext;
import org.apache.struts2.ActionInvocation;
import org.apache.struts2.SimpleAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package org.apache.struts2.interceptor;

import org.apache.struts2.action.Action;
import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.ActionProxy;
import org.apache.struts2.ActionProxyFactory;
import org.apache.struts2.DefaultActionProxyFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml"/>
<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
</result-types>
<interceptors>
<interceptor name="params" class="org.apache.struts2.interceptor.parameter.ParametersInterceptor"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<package name="default">

<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml"/>
<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<struts>
<package name="allow2">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
</result-types>

<interceptors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml" />
<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml" />
<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
</result-types>
<interceptors>
<interceptor name="params" class="org.apache.struts2.interceptor.parameter.ParametersInterceptor"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml" />
<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true" />
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true" />
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>
</package>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml" />
<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
</result-types>

<action name="noname">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml" />
<package name="default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>

Expand Down
Binary file modified core/src/test/resources/xwork - jar.jar
Binary file not shown.
Binary file modified core/src/test/resources/xwork - zip.zip
Binary file not shown.
Binary file modified core/src/test/resources/xwork-jar.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion core/src/test/resources/xwork-proxyinvoke.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<package name="xwork-test-default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="void" class="org.apache.struts2.VoidResult"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/xwork-test-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<struts>
<package name="xwork-test-default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="void" class="org.apache.struts2.VoidResult"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/xwork-test-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include file="xwork-test-beans.xml" />
<package name="xwork-test-default">
<result-types>
<result-type name="chain" class="org.apache.struts2.ActionChainResult" default="true"/>
<result-type name="chain" class="org.apache.struts2.result.ActionChainResult" default="true"/>
<result-type name="void" class="org.apache.struts2.VoidResult"/>
<result-type name="mock" class="org.apache.struts2.mock.MockResult"/>
</result-types>
Expand Down
Binary file modified core/src/test/resources/xwork-zip.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*/
package org.apache.struts2.convention;

import org.apache.struts2.result.ActionChainResult;
import jakarta.servlet.ServletContext;
import junit.framework.TestCase;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.ActionChainResult;
import org.apache.struts2.ActionContext;
import org.apache.struts2.FileManager;
import org.apache.struts2.FileManagerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package org.apache.struts2.spring;

import org.apache.struts2.action.Action;
import org.apache.struts2.ActionChainResult;
import org.apache.struts2.result.ActionChainResult;
import org.apache.struts2.ActionContext;
import org.apache.struts2.ModelDrivenAction;
import org.apache.struts2.ObjectFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<result-type name="null" class="org.apache.struts2.mock.MockResult" default="true"/>
<result-type name="springResult" class="springResult"/>
<result-type name="chain"
class="org.apache.struts2.ActionChainResult"/>
class="org.apache.struts2.result.ActionChainResult"/>
</result-types>

<interceptors>
Expand Down

0 comments on commit 83cb936

Please sign in to comment.