diff --git a/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java b/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java index 50d9c8fa65..64ef99dfa5 100644 --- a/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java +++ b/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java @@ -18,9 +18,9 @@ */ package org.demo.rest.example; -import com.opensymphony.xwork2.ModelDriven; -import com.opensymphony.xwork2.Validateable; -import com.opensymphony.xwork2.ValidationAwareSupport; +import org.apache.struts2.ModelDriven; +import org.apache.struts2.Validateable; +import org.apache.struts2.ValidationAwareSupport; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.convention.annotation.Result; diff --git a/apps/rest-showcase/src/main/resources/log4j2.xml b/apps/rest-showcase/src/main/resources/log4j2.xml index c884157426..f6836e06ae 100644 --- a/apps/rest-showcase/src/main/resources/log4j2.xml +++ b/apps/rest-showcase/src/main/resources/log4j2.xml @@ -26,7 +26,6 @@ - diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 33df6ee79c..a7bfa86944 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -248,7 +248,6 @@ 8090 10 - ${basedir}/src/main/webapp/ ${project.build.directory}/extraclasspath/struts2-velocity-tools-view-jakarta.jar, diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java index 21aa14840e..df1fbe5116 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import java.text.DateFormat; import java.util.Calendar; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java index c194ca386c..67bdba155d 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import org.apache.struts2.showcase.ajax.tree.Category; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java index 9d861c9205..e82d72187b 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java index ac18342a53..e4a0667a32 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java index 72f554bed3..7f0d683940 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java index 242790c9f8..c2bab811d0 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import org.apache.struts2.showcase.ajax.tree.Category; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java index cec9974658..22561463e5 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.showcase.ajax.tree.Category; // START SNIPPET: treeExampleDynamicJavaShow diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java index c04114c2ed..da7373de8d 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java @@ -20,9 +20,9 @@ */ package org.apache.struts2.showcase; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.Validateable; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionSupport; +import org.apache.struts2.Validateable; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.ServletActionContext; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java index e5204a1fad..871136c64c 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.action; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java index e8a411fe3d..634b549efe 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.action; -import com.opensymphony.xwork2.Preparable; +import org.apache.struts2.Preparable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java index 771d49cbca..b8ef9bdb62 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.action; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import java.util.Arrays; import java.util.Date; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java index 7683a97019..8e0e71a9ae 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.showcase.action; -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.interceptor.annotations.After; +import org.apache.struts2.Action; +import org.apache.struts2.interceptor.annotations.After; import org.apache.struts2.ServletActionContext; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java index 0c3ff4f7c4..351a6a24e7 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ParamsAnnotationAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.action; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import org.apache.struts2.showcase.model.MyDto; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java index ce462095b5..651c3c86d6 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.action; -import com.opensymphony.xwork2.Preparable; +import org.apache.struts2.Preparable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java index e57006f2bd..34989dad6f 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.actionchaining; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; public class ActionChain1 extends ActionSupport { diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java index 32e7f67676..14196c0a74 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.actionchaining; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; public class ActionChain2 extends ActionSupport { diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java index 402a1b578c..d00d87f479 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.actionchaining; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; public class ActionChain3 extends ActionSupport { diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java index ec146c05d9..02cd9f1f82 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.ajax; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.io.Serializable; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java index 9193ec918a..44b7938db8 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.ajax; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java index c698da86df..f3c9c6420e 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.ajax; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.text.SimpleDateFormat; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java index d5f7b1c3dc..2873c55924 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.ajax; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; public class Example5Action extends ActionSupport { diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java index cbb7ec1e49..54b5fded9f 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.ajax.tree; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java index be05ce1a9a..bdf7bd4e64 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/async/ChatRoomAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.async; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java index e820f552c7..ad352ff522 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java @@ -21,10 +21,10 @@ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.Action; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java index 324226b2d0..52678d2889 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java @@ -20,10 +20,10 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.Action; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java index d40232e0ba..34ff5788a5 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.SessionAware; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java index 452ce0d089..03c48087e5 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import java.util.Map; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java index ca546792ab..64af60e912 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; public class CrudRoomAction extends ActionSupport { diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java index eb784b62db..0689f3af04 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Inject; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; import org.apache.struts2.util.StrutsTypeConverter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java index bf5c6df9ad..b25ac7ee8d 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.SessionAware; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java index e87dfdc950..38009ace37 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.SessionAware; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java index 3489bac713..1dad05aa37 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java index 8ed8b4e825..f511c0bf4e 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import java.util.ArrayList; import java.util.List; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java index 51843179db..b179f94940 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.SessionAware; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java index c2a15c1072..e0d61b4363 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import java.util.ArrayList; import java.util.List; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java index 0f97a34010..4cf1acaec9 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.chat; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java index 0f764b787b..d0eb196b4e 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.conversion; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.LinkedHashSet; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java index a3fb3b8277..17d7cbe28c 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.conversion; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.Arrays; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java index 27df30a974..1f7cd4d29f 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.conversion; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.List; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java index 5f23c19d7e..da35e7bb82 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.filedownload; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; import org.apache.struts2.ServletActionContext; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java index bdcc2e5bb3..1fa4eab527 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.fileupload; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.UploadedFilesAware; import org.apache.struts2.dispatcher.multipart.UploadedFile; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java index ff26356131..8b7c630be6 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java @@ -21,7 +21,7 @@ // START SNIPPET: entire-file package org.apache.struts2.showcase.fileupload; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.UploadedFilesAware; import org.apache.struts2.dispatcher.multipart.UploadedFile; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java index e60b0df3e0..f32e643dec 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java @@ -21,7 +21,7 @@ // START SNIPPET: entire-file package org.apache.struts2.showcase.fileupload; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.UploadedFilesAware; import org.apache.struts2.dispatcher.multipart.UploadedFile; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java index 207a090047..45c58ab055 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.freemarker; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.freemarker.FreemarkerManager; import org.apache.struts2.views.freemarker.ScopesHashModel; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java index c79480ff06..36831c7800 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.freemarker; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.Preparable; +import org.apache.struts2.ActionSupport; +import org.apache.struts2.Preparable; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.text.DateFormatSymbols; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java index 660c5e9e8b..83946bdff2 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.hangman; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import java.util.Map; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java index 3df913d585..c823eabbc4 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.hangman; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.action.SessionAware; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java index bc4138a238..fe9f2333df 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.hangman; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import java.util.Map; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java index 0fae6c4811..9dd0454e59 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.modelDriven; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.ModelDriven; +import org.apache.struts2.ActionSupport; +import org.apache.struts2.ModelDriven; import org.apache.struts2.showcase.modelDriven.model.Gangster; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java index 8fbdee0b21..3e52dbf028 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.person; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java index 2d21587874..34e5d2f3cd 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.person; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.convention.annotation.Result; import org.springframework.beans.factory.annotation.Autowired; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java index d5888af857..71054aa109 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.person; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java index d1ba0a412b..2cd4b5a1b2 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.source; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.ActionSupport; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.struts2.action.ServletContextAware; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java index 6e5afa8069..176e9449bb 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.tag.nonui.actionPrefix; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; public class SubmitAction extends ActionSupport { diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java index d39f877a2b..e105449edf 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.tag.nonui.actiontag; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; /** */ diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java index 4d732fecdc..be740d506a 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/debugtag/DebugTagAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.showcase.tag.nonui.debugtag; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.dispatcher.PrepareOperations; public class DebugTagAction extends ActionSupport { diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java index deca54ab07..ada4ccb686 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.tag.nonui.iteratortag; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.Validateable; +import org.apache.struts2.ActionSupport; +import org.apache.struts2.Validateable; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java index ca66f63de6..735c38fd6f 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.tag.nonui.iteratortag; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java index 6bb4c9b1cb..33c5cdd59f 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.tag.nonui.iteratortag; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.Validateable; +import org.apache.struts2.ActionSupport; +import org.apache.struts2.Validateable; import org.apache.struts2.interceptor.parameter.StrutsParameter; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java index ccbd310133..3d5567abe1 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.tag.nonui.iteratortag; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.Validateable; +import org.apache.struts2.ActionSupport; +import org.apache.struts2.Validateable; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java index 2b789c2d8c..f60a673e51 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/tiles/TilesAnnotationsAction.java @@ -24,7 +24,7 @@ import org.apache.struts2.tiles.annotation.TilesDefinition; import org.apache.struts2.tiles.annotation.TilesPutAttribute; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; @Namespace("/tiles") @ParentPackage("tiles") diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java index 297c19c754..0b731e325c 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java @@ -20,8 +20,8 @@ */ package org.apache.struts2.showcase.token; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.Date; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java index 53228a952f..775de00442 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.validation; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; /** */ diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java index 4c831c754a..6fdafed611 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AjaxFormSubmitAction.java @@ -18,15 +18,15 @@ */ package org.apache.struts2.showcase.validation; -import com.opensymphony.xwork2.validator.annotations.DateRangeFieldValidator; -import com.opensymphony.xwork2.validator.annotations.EmailValidator; -import com.opensymphony.xwork2.validator.annotations.FieldExpressionValidator; -import com.opensymphony.xwork2.validator.annotations.IntRangeFieldValidator; -import com.opensymphony.xwork2.validator.annotations.RegexFieldValidator; -import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator; -import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator; -import com.opensymphony.xwork2.validator.annotations.StringLengthFieldValidator; -import com.opensymphony.xwork2.validator.annotations.UrlValidator; +import org.apache.struts2.validator.annotations.DateRangeFieldValidator; +import org.apache.struts2.validator.annotations.EmailValidator; +import org.apache.struts2.validator.annotations.FieldExpressionValidator; +import org.apache.struts2.validator.annotations.IntRangeFieldValidator; +import org.apache.struts2.validator.annotations.RegexFieldValidator; +import org.apache.struts2.validator.annotations.RequiredFieldValidator; +import org.apache.struts2.validator.annotations.RequiredStringValidator; +import org.apache.struts2.validator.annotations.StringLengthFieldValidator; +import org.apache.struts2.validator.annotations.UrlValidator; import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.sql.Date; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java index 2383aa3ade..96a53942ea 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/BeanValidationExampleAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.validation; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts.beanvalidation.constraints.FieldMatch; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java index 35fc1c3ca3..7ac1f15f74 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.validation; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java index ca01f89939..bdaa8aa2c6 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.validation; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java index cd14a36746..1814c0fa5d 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.wait; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import org.apache.struts2.interceptor.parameter.StrutsParameter; /** diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java index 76f412e48d..0075e451e1 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java @@ -20,7 +20,7 @@ */ package org.apache.struts2.showcase.xslt; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import jakarta.servlet.http.HttpServletRequest; diff --git a/apps/showcase/src/main/resources/log4j2.xml b/apps/showcase/src/main/resources/log4j2.xml index 33dafdd7ef..d7836c7179 100644 --- a/apps/showcase/src/main/resources/log4j2.xml +++ b/apps/showcase/src/main/resources/log4j2.xml @@ -30,6 +30,5 @@ - diff --git a/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt b/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt index 4342f8b219..c3e913b20d 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt +++ b/apps/showcase/src/main/webapp/WEB-INF/conversion/AddressAction.java.txt @@ -20,7 +20,7 @@ package org.apache.struts2.showcase.conversion; import java.util.LinkedHashSet; import java.util.Set; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; /** * @version $Date$ $Id$ @@ -28,15 +28,15 @@ import com.opensymphony.xwork2.ActionSupport; public class AddressAction extends ActionSupport { private Set addresses = new LinkedHashSet(); - + public Set getAddresses() { return addresses; } public void setAddresses(Set addresses) { this.addresses = addresses; } - - + + public String input() throws Exception { return SUCCESS; } - + public String submit() throws Exception { System.out.println(addresses); return SUCCESS; diff --git a/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt b/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt index 35e1175721..e2ad8d76cb 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt +++ b/apps/showcase/src/main/webapp/WEB-INF/conversion/OperationsEnumAction.java.txt @@ -21,28 +21,28 @@ import java.util.Arrays; import java.util.LinkedList; import java.util.List; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; /** - * + * * @version $Date$ $Id$ */ public class OperationsEnumAction extends ActionSupport { private static final long serialVersionUID = -2229489704988870318L; - + private List selectedOperations = new LinkedList(); - + public List getSelectedOperations() { return this.selectedOperations; } public void setSelectedOperations(List selectedOperations) { this.selectedOperations = selectedOperations; } - - + + public List getAvailableOperations() { return Arrays.asList(OperationsEnum.values()); } - + public String input() throws Exception { return SUCCESS; } diff --git a/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt b/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt index 1e0bd55e3a..fbbcf2dc4c 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt +++ b/apps/showcase/src/main/webapp/WEB-INF/conversion/PersonAction.java.txt @@ -19,24 +19,24 @@ package org.apache.struts2.showcase.conversion; import java.util.List; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; /** - * + * */ public class PersonAction extends ActionSupport { - + private List persons; - + public List getPersons() { return persons; } public void setPersons(List persons) { this.persons = persons; } - - - + + + public String input() throws Exception { return SUCCESS; } - + public String submit() throws Exception { return SUCCESS; } diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp index 9693e037af..a020e926d2 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp @@ -31,11 +31,11 @@ // Calculate the view sources url String sourceUrl = request.getContextPath() + "/viewSource.action"; - com.opensymphony.xwork2.ActionInvocation inv = com.opensymphony.xwork2.ActionContext.getContext().getActionInvocation(); + org.apache.struts2.ActionInvocation inv = org.apache.struts2.ActionContext.getContext().getActionInvocation(); org.apache.struts2.dispatcher.mapper.ActionMapping mapping = org.apache.struts2.ServletActionContext.getActionMapping(); if (inv != null) { try { - com.opensymphony.xwork2.util.location.Location loc = inv.getProxy().getConfig().getLocation(); + org.apache.struts2.util.location.Location loc = inv.getProxy().getConfig().getLocation(); sourceUrl += "?config=" + (loc != null ? loc.getURI() + ":" + loc.getLineNumber() : ""); } catch (Exception e) { sourceUrl += "?config="; @@ -86,7 +86,7 @@ diff --git a/apps/showcase/src/main/webapp/WEB-INF/dwr.xml b/apps/showcase/src/main/webapp/WEB-INF/dwr.xml index e2ce2bef3c..2837fed6dc 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/dwr.xml +++ b/apps/showcase/src/main/webapp/WEB-INF/dwr.xml @@ -20,8 +20,8 @@ */ --> - @@ -29,7 +29,7 @@ - + diff --git a/core/pom.xml b/core/pom.xml index 49ffa39c9b..965351898c 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -186,7 +186,7 @@ commons-text - + org.hibernate hibernate-core diff --git a/core/src/main/java/com/opensymphony/xwork2/Action.java b/core/src/main/java/com/opensymphony/xwork2/Action.java deleted file mode 100644 index 57d7678341..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/Action.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.Action} instead. - */ -@Deprecated -public interface Action extends org.apache.struts2.Action { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionContext.java b/core/src/main/java/com/opensymphony/xwork2/ActionContext.java deleted file mode 100644 index 32a6f13030..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/ActionContext.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -import com.opensymphony.xwork2.conversion.impl.ConversionData; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.util.ValueStack; -import org.apache.struts2.dispatcher.HttpParameters; -import org.apache.struts2.dispatcher.mapper.ActionMapping; - -import jakarta.servlet.ServletContext; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.servlet.jsp.PageContext; -import java.util.Locale; -import java.util.Map; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.ActionContext} instead. - */ -@Deprecated -public class ActionContext extends org.apache.struts2.ActionContext { - - private ActionContext(org.apache.struts2.ActionContext actualContext) { - super(actualContext.getContextMap()); - } - - public static ActionContext adapt(org.apache.struts2.ActionContext actualContext) { - if (actualContext instanceof ActionContext) { - return (ActionContext) actualContext; - } - return actualContext != null ? new ActionContext(actualContext) : null; - } - - public static ActionContext of(Map context) { - return adapt(org.apache.struts2.ActionContext.of(context)); - } - - public static ActionContext of() { - return adapt(org.apache.struts2.ActionContext.of()); - } - - public static ActionContext bind(ActionContext actionContext) { - return adapt(org.apache.struts2.ActionContext.bind(actionContext)); - } - - public static boolean containsValueStack(Map context) { - return org.apache.struts2.ActionContext.containsValueStack(context); - } - - public static void clear() { - org.apache.struts2.ActionContext.clear(); - } - - public static ActionContext getContext() { - return adapt(org.apache.struts2.ActionContext.getContext()); - } - - @Override - public ActionContext bind() { - super.bind(); - return this; - } - - public ActionContext withActionInvocation(ActionInvocation actionInvocation) { - return withActionInvocation((org.apache.struts2.ActionInvocation) actionInvocation); - } - - @Override - public ActionContext withActionInvocation(org.apache.struts2.ActionInvocation actionInvocation) { - super.withActionInvocation(actionInvocation); - return this; - } - - @Override - public ActionInvocation getActionInvocation() { - return ActionInvocation.adapt(super.getActionInvocation()); - } - - @Override - public ActionContext withApplication(Map application) { - super.withApplication(application); - return this; - } - - @Override - public Map getApplication() { - return super.getApplication(); - } - - @Override - public Map getContextMap() { - return super.getContextMap(); - } - - @Override - public ActionContext withConversionErrors(Map conversionErrors) { - super.withConversionErrors(conversionErrors); - return this; - } - - @Override - public Map getConversionErrors() { - return super.getConversionErrors(); - } - - @Override - public ActionContext withLocale(Locale locale) { - super.withLocale(locale); - return this; - } - - @Override - public Locale getLocale() { - return super.getLocale(); - } - - @Override - public ActionContext withActionName(String actionName) { - super.withActionName(actionName); - return this; - } - - @Override - public String getActionName() { - return super.getActionName(); - } - - @Override - public ActionContext withParameters(HttpParameters parameters) { - super.withParameters(parameters); - return this; - } - - @Override - public HttpParameters getParameters() { - return super.getParameters(); - } - - @Override - public ActionContext withSession(Map session) { - super.withSession(session); - return this; - } - - @Override - public Map getSession() { - return super.getSession(); - } - - public ActionContext withValueStack(ValueStack valueStack) { - return withValueStack((org.apache.struts2.util.ValueStack) valueStack); - } - - @Override - public ActionContext withValueStack(org.apache.struts2.util.ValueStack valueStack) { - super.withValueStack(valueStack); - return this; - } - - @Override - public ValueStack getValueStack() { - return ValueStack.adapt(super.getValueStack()); - } - - @Override - public ActionContext withContainer(Container container) { - super.withContainer(container); - return this; - } - - @Override - public Container getContainer() { - return super.getContainer(); - } - - @Override - public T getInstance(Class type) { - return super.getInstance(type); - } - - @Override - public Object get(String key) { - return super.get(key); - } - - @Override - public void put(String key, Object value) { - super.put(key, value); - } - - @Override - public ServletContext getServletContext() { - return super.getServletContext(); - } - - @Override - public ActionContext withServletContext(ServletContext servletContext) { - super.withServletContext(servletContext); - return this; - } - - @Override - public HttpServletRequest getServletRequest() { - return super.getServletRequest(); - } - - @Override - public ActionContext withServletRequest(HttpServletRequest request) { - super.withServletRequest(request); - return this; - } - - @Override - public HttpServletResponse getServletResponse() { - return super.getServletResponse(); - } - - @Override - public ActionContext withServletResponse(HttpServletResponse response) { - super.withServletResponse(response); - return this; - } - - @Override - public PageContext getPageContext() { - return super.getPageContext(); - } - - @Override - public ActionContext withPageContext(PageContext pageContext) { - super.withPageContext(pageContext); - return this; - } - - @Override - public ActionMapping getActionMapping() { - return super.getActionMapping(); - } - - @Override - public ActionContext withActionMapping(ActionMapping actionMapping) { - super.withActionMapping(actionMapping); - return this; - } - - @Override - public ActionContext withExtraContext(Map extraContext) { - super.withExtraContext(extraContext); - return this; - } - - @Override - public ActionContext with(String key, Object value) { - super.with(key, value); - return this; - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionEventListener.java b/core/src/main/java/com/opensymphony/xwork2/ActionEventListener.java deleted file mode 100644 index 28d46e9923..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/ActionEventListener.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.ActionEventListener} instead. - */ -@Deprecated -public interface ActionEventListener extends org.apache.struts2.ActionEventListener { - - @Override - default Object prepare(Object action, org.apache.struts2.util.ValueStack stack) { - return prepare(action, ValueStack.adapt(stack)); - } - - @Override - default String handleException(Throwable t, org.apache.struts2.util.ValueStack stack) { - return handleException(t, ValueStack.adapt(stack)); - } - - Object prepare(Object action, ValueStack stack); - - String handleException(Throwable t, ValueStack stack); - - static ActionEventListener adapt(org.apache.struts2.ActionEventListener actualListener) { - if (actualListener instanceof ActionEventListener) { - return (ActionEventListener) actualListener; - } - return actualListener != null ? new LegacyAdapter(actualListener) : null; - } - - class LegacyAdapter implements ActionEventListener { - - private final org.apache.struts2.ActionEventListener adaptee; - - private LegacyAdapter(org.apache.struts2.ActionEventListener adaptee) { - this.adaptee = adaptee; - } - - @Override - public Object prepare(Object action, ValueStack stack) { - return adaptee.prepare(action, stack); - } - - @Override - public String handleException(Throwable t, ValueStack stack) { - return adaptee.handleException(t, stack); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionInvocation.java b/core/src/main/java/com/opensymphony/xwork2/ActionInvocation.java deleted file mode 100644 index 81e55d592d..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/ActionInvocation.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -import com.opensymphony.xwork2.interceptor.PreResultListener; -import com.opensymphony.xwork2.util.ValueStack; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.ActionInvocation} instead. - */ -@Deprecated -public interface ActionInvocation extends org.apache.struts2.ActionInvocation { - - @Override - ActionContext getInvocationContext(); - - @Override - Result getResult() throws Exception; - - @Override - ActionProxy getProxy(); - - @Override - ValueStack getStack(); - - @Override - default void addPreResultListener(org.apache.struts2.interceptor.PreResultListener listener) { - addPreResultListener(PreResultListener.adapt(listener)); - } - - void addPreResultListener(PreResultListener listener); - - @Override - default void setActionEventListener(org.apache.struts2.ActionEventListener listener) { - setActionEventListener(ActionEventListener.adapt(listener)); - } - - void setActionEventListener(ActionEventListener listener); - - @Override - default void init(org.apache.struts2.ActionProxy proxy) { - init(ActionProxy.adapt(proxy)); - } - - void init(ActionProxy proxy); - - static ActionInvocation adapt(org.apache.struts2.ActionInvocation actualInvocation) { - if (actualInvocation instanceof ActionInvocation) { - return (ActionInvocation) actualInvocation; - } - return actualInvocation != null ? new LegacyAdapter(actualInvocation) : null; - } - - class LegacyAdapter implements ActionInvocation { - - private final org.apache.struts2.ActionInvocation adaptee; - - private LegacyAdapter(org.apache.struts2.ActionInvocation adaptee) { - this.adaptee = adaptee; - } - - @Override - public Object getAction() { - return adaptee.getAction(); - } - - @Override - public boolean isExecuted() { - return adaptee.isExecuted(); - } - - @Override - public ActionContext getInvocationContext() { - return ActionContext.adapt(adaptee.getInvocationContext()); - } - - @Override - public ActionProxy getProxy() { - return ActionProxy.adapt(adaptee.getProxy()); - } - - @Override - public Result getResult() throws Exception { - return Result.adapt(adaptee.getResult()); - } - - @Override - public String getResultCode() { - return adaptee.getResultCode(); - } - - @Override - public void setResultCode(String resultCode) { - adaptee.setResultCode(resultCode); - } - - @Override - public ValueStack getStack() { - return ValueStack.adapt(adaptee.getStack()); - } - - @Override - public void addPreResultListener(PreResultListener listener) { - adaptee.addPreResultListener(listener); - } - - @Override - public String invoke() throws Exception { - return adaptee.invoke(); - } - - @Override - public String invokeActionOnly() throws Exception { - return adaptee.invokeActionOnly(); - } - - @Override - public void setActionEventListener(ActionEventListener listener) { - adaptee.setActionEventListener(listener); - } - - @Override - public void init(ActionProxy proxy) { - adaptee.init(proxy); - } - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionProxy.java b/core/src/main/java/com/opensymphony/xwork2/ActionProxy.java deleted file mode 100644 index c3905a1a09..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/ActionProxy.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -import com.opensymphony.xwork2.config.entities.ActionConfig; - -@Deprecated -public interface ActionProxy extends org.apache.struts2.ActionProxy { - - @Override - ActionInvocation getInvocation(); - - static ActionProxy adapt(org.apache.struts2.ActionProxy actualProxy) { - if (actualProxy instanceof ActionProxy) { - return (ActionProxy) actualProxy; - } - return actualProxy != null ? new LegacyAdapter(actualProxy) : null; - } - - class LegacyAdapter implements ActionProxy { - - private final org.apache.struts2.ActionProxy adaptee; - - private LegacyAdapter(org.apache.struts2.ActionProxy adaptee) { - this.adaptee = adaptee; - } - - @Override - public Object getAction() { - return adaptee.getAction(); - } - - @Override - public String getActionName() { - return adaptee.getActionName(); - } - - @Override - public ActionConfig getConfig() { - return adaptee.getConfig(); - } - - @Override - public void setExecuteResult(boolean executeResult) { - adaptee.setExecuteResult(executeResult); - } - - @Override - public boolean getExecuteResult() { - return adaptee.getExecuteResult(); - } - - @Override - public ActionInvocation getInvocation() { - return ActionInvocation.adapt(adaptee.getInvocation()); - } - - @Override - public String getNamespace() { - return adaptee.getNamespace(); - } - - @Override - public String execute() throws Exception { - return adaptee.execute(); - } - - @Override - public String getMethod() { - return adaptee.getMethod(); - } - - @Override - public boolean isMethodSpecified() { - return adaptee.isMethodSpecified(); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java deleted file mode 100644 index be9cc29cad..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -import com.opensymphony.xwork2.interceptor.ValidationAware; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.ActionSupport} instead. - */ -@Deprecated -public class ActionSupport extends org.apache.struts2.ActionSupport implements Action, Validateable, ValidationAware { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/ModelDriven.java b/core/src/main/java/com/opensymphony/xwork2/ModelDriven.java deleted file mode 100644 index f3ae25cab2..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/ModelDriven.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.ModelDriven} instead. - */ -@Deprecated -public interface ModelDriven extends org.apache.struts2.ModelDriven { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/Preparable.java b/core/src/main/java/com/opensymphony/xwork2/Preparable.java deleted file mode 100644 index 2c03088e8d..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/Preparable.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.Preparable} instead. - */ -@Deprecated -public interface Preparable extends org.apache.struts2.Preparable { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/Result.java b/core/src/main/java/com/opensymphony/xwork2/Result.java deleted file mode 100644 index 36a93438a7..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/Result.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.Result} instead. - */ -@Deprecated -public interface Result extends org.apache.struts2.Result { - - @Override - default void execute(org.apache.struts2.ActionInvocation invocation) throws Exception { - execute(ActionInvocation.adapt(invocation)); - } - - void execute(ActionInvocation invocation) throws Exception; - - static Result adapt(org.apache.struts2.Result actualResult) { - if (actualResult instanceof Result) { - return (Result) actualResult; - } - return actualResult != null ? new LegacyAdapter(actualResult) : null; - } - - class LegacyAdapter implements Result { - - private final org.apache.struts2.Result adaptee; - - private LegacyAdapter(org.apache.struts2.Result adaptee) { - this.adaptee = adaptee; - } - - @Override - public void execute(ActionInvocation invocation) throws Exception { - adaptee.execute(ActionInvocation.adapt(invocation)); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/Unchainable.java b/core/src/main/java/com/opensymphony/xwork2/Unchainable.java deleted file mode 100644 index 506f4f2831..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/Unchainable.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.Unchainable} instead. - */ -@Deprecated -public interface Unchainable extends org.apache.struts2.Unchainable { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/Validateable.java b/core/src/main/java/com/opensymphony/xwork2/Validateable.java deleted file mode 100644 index c92170e732..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/Validateable.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.Validateable} instead. - */ -@Deprecated -public interface Validateable extends org.apache.struts2.Validateable { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/config/package.html b/core/src/main/java/com/opensymphony/xwork2/config/package.html deleted file mode 100644 index eacf1c8f65..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/config/package.html +++ /dev/null @@ -1,21 +0,0 @@ - -Configuration core classes. diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultResultFactory.java b/core/src/main/java/com/opensymphony/xwork2/factory/DefaultResultFactory.java deleted file mode 100644 index 42527494e1..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultResultFactory.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.factory; - -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.reflection.ReflectionException; -import com.opensymphony.xwork2.util.reflection.ReflectionExceptionHandler; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; - -import java.util.Map; - -/** - * Default implementation - */ -public class DefaultResultFactory implements ResultFactory { - - private ObjectFactory objectFactory; - private ReflectionProvider reflectionProvider; - - @Inject - public void setObjectFactory(ObjectFactory objectFactory) { - this.objectFactory = objectFactory; - } - - @Inject - public void setReflectionProvider(ReflectionProvider reflectionProvider) { - this.reflectionProvider = reflectionProvider; - } - - public Result buildResult(ResultConfig resultConfig, Map extraContext) throws Exception { - String resultClassName = resultConfig.getClassName(); - Result result = null; - - if (resultClassName != null) { - Object o = objectFactory.buildBean(resultClassName, extraContext); - - Map params = resultConfig.getParams(); - if (params != null) { - for (Map.Entry paramEntry : params.entrySet()) { - try { - reflectionProvider.setProperty(paramEntry.getKey(), paramEntry.getValue(), o, extraContext, true); - } catch (ReflectionException ex) { - if (o instanceof ReflectionExceptionHandler) { - ((ReflectionExceptionHandler) o).handle(ex); - } - } - } - } - - if (o instanceof Result) { - result = (Result) o; - } else if (o instanceof org.apache.struts2.Result) { - result = Result.adapt((org.apache.struts2.Result) o); - } - if (result == null) { - throw new ConfigurationException("Class [" + resultClassName + "] does not implement Result", resultConfig); - } - } - - return result; - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/AbstractInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/AbstractInterceptor.java deleted file mode 100644 index 69c6674621..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/AbstractInterceptor.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.AbstractInterceptor} instead. - */ -@Deprecated -public abstract class AbstractInterceptor extends org.apache.struts2.interceptor.AbstractInterceptor implements ConditionalInterceptor { - - /** - * Override to handle interception - */ - public abstract String intercept(ActionInvocation invocation) throws Exception; - - @Override - public String intercept(org.apache.struts2.ActionInvocation invocation) throws Exception { - return intercept(ActionInvocation.adapt(invocation)); - } - - @Override - public boolean shouldIntercept(ActionInvocation invocation) { - return shouldIntercept((org.apache.struts2.ActionInvocation) invocation); - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java deleted file mode 100644 index acc72a6620..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.security.AcceptedPatternsChecker; -import com.opensymphony.xwork2.security.ExcludedPatternsChecker; -import com.opensymphony.xwork2.util.ClearableValueStack; -import com.opensymphony.xwork2.util.Evaluated; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.StrutsConstants; -import org.apache.struts2.dispatcher.HttpParameters; -import org.apache.struts2.dispatcher.Parameter; -import org.apache.struts2.interceptor.ValidationAware; - -import java.util.Map; - - -/** - * - * - * The aim of this Interceptor is to alias a named parameter to a different named parameter. By acting as the glue - * between actions sharing similar parameters (but with different names), it can help greatly with action chaining. - * - *

Action's alias expressions should be in the form of #{ "name1" : "alias1", "name2" : "alias2" }. - * This means that assuming an action (or something else in the stack) has a value for the expression named name1 and the - * action this interceptor is applied to has a setter named alias1, alias1 will be set with the value from - * name1. - *

- * - * - * - *

Interceptor parameters:

- * - * - * - *
    - * - *
  • aliasesKey (optional) - the name of the action parameter to look for the alias map (by default this is - * aliases).
  • - * - *
- * - * - * - *

Extending the interceptor:

- * - * - * - * This interceptor does not have any known extension points. - * - * - * - *

Example code:

- * - *
- * 
- * <action name="someAction" class="com.examples.SomeAction">
- *     <!-- The value for the foo parameter will be applied as if it were named bar -->
- *     <param name="aliases">#{ 'foo' : 'bar' }</param>
- *
- *     <interceptor-ref name="alias"/>
- *     <interceptor-ref name="basicStack"/>
- *     <result name="success">good_result.ftl</result>
- * </action>
- * 
- * 
- * - * @author Matthew Payne - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.AliasInterceptor} instead. - */ -@Deprecated -public class AliasInterceptor extends AbstractInterceptor { - - private static final Logger LOG = LogManager.getLogger(AliasInterceptor.class); - - private static final String DEFAULT_ALIAS_KEY = "aliases"; - protected String aliasesKey = DEFAULT_ALIAS_KEY; - - protected ValueStackFactory valueStackFactory; - protected LocalizedTextProvider localizedTextProvider; - protected boolean devMode = false; - - private ExcludedPatternsChecker excludedPatterns; - private AcceptedPatternsChecker acceptedPatterns; - - @Inject(StrutsConstants.STRUTS_DEVMODE) - public void setDevMode(String mode) { - this.devMode = Boolean.parseBoolean(mode); - } - - @Inject - public void setValueStackFactory(ValueStackFactory valueStackFactory) { - this.valueStackFactory = valueStackFactory; - } - - @Inject - public void setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) { - this.localizedTextProvider = localizedTextProvider; - } - - @Inject - public void setExcludedPatterns(ExcludedPatternsChecker excludedPatterns) { - this.excludedPatterns = excludedPatterns; - } - - @Inject - public void setAcceptedPatterns(AcceptedPatternsChecker acceptedPatterns) { - this.acceptedPatterns = acceptedPatterns; - } - - /** - *

- * Sets the name of the action parameter to look for the alias map. - *

- * - *

- * Default is aliases. - *

- * - * @param aliasesKey the name of the action parameter - */ - public void setAliasesKey(String aliasesKey) { - this.aliasesKey = aliasesKey; - } - - @Override public String intercept(ActionInvocation invocation) throws Exception { - - ActionConfig config = invocation.getProxy().getConfig(); - ActionContext ac = invocation.getInvocationContext(); - Object action = invocation.getAction(); - - // get the action's parameters - final Map parameters = config.getParams(); - - if (parameters.containsKey(aliasesKey)) { - - String aliasExpression = parameters.get(aliasesKey); - ValueStack stack = ac.getValueStack(); - Object obj = stack.findValue(aliasExpression); - - if (obj instanceof Map aliases) { - //get secure stack - ValueStack newStack = valueStackFactory.createValueStack(stack); - boolean clearableStack = newStack instanceof ClearableValueStack; - if (clearableStack) { - //if the stack's context can be cleared, do that to prevent OGNL - //from having access to objects in the stack, see XW-641 - ((ClearableValueStack)newStack).clearContextValues(); - Map context = newStack.getContext(); - ReflectionContextState.setCreatingNullObjects(context, true); - ReflectionContextState.setDenyMethodExecution(context, true); - ReflectionContextState.setReportingConversionErrors(context, true); - - //keep locale from original context - newStack.getActionContext().withLocale(stack.getActionContext().getLocale()); - } - - // override - for (Object o : aliases.entrySet()) { - Map.Entry entry = (Map.Entry) o; - String name = entry.getKey().toString(); - if (isNotAcceptableExpression(name)) { - continue; - } - String alias = (String) entry.getValue(); - if (isNotAcceptableExpression(alias)) { - continue; - } - Evaluated value = new Evaluated(stack.findValue(name)); - if (!value.isDefined()) { - // workaround - HttpParameters contextParameters = ActionContext.getContext().getParameters(); - - if (null != contextParameters) { - Parameter param = contextParameters.get(name); - if (param.isDefined()) { - value = new Evaluated(param.getValue()); - } - } - } - if (value.isDefined()) { - try { - newStack.setValue(alias, value.get()); - } catch (RuntimeException e) { - if (devMode) { - String developerNotification = localizedTextProvider.findText(AliasInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{ - "Unexpected Exception caught setting '" + entry.getKey() + "' on '" + action.getClass() + ": " + e.getMessage() - }); - LOG.error(developerNotification); - if (action instanceof ValidationAware) { - ((ValidationAware) action).addActionMessage(developerNotification); - } - } - } - } - } - - if (clearableStack) { - stack.getActionContext().withConversionErrors(newStack.getActionContext().getConversionErrors()); - } - } else { - LOG.debug("invalid alias expression: {}", aliasesKey); - } - } - - return invocation.invoke(); - } - - protected boolean isAccepted(String paramName) { - AcceptedPatternsChecker.IsAccepted result = acceptedPatterns.isAccepted(paramName); - if (result.isAccepted()) { - return true; - } - - LOG.warn("Parameter [{}] didn't match accepted pattern [{}]! See Accepted / Excluded patterns at\n" + - "https://struts.apache.org/security/#accepted--excluded-patterns", - paramName, result.getAcceptedPattern()); - - return false; - } - - protected boolean isExcluded(String paramName) { - ExcludedPatternsChecker.IsExcluded result = excludedPatterns.isExcluded(paramName); - if (!result.isExcluded()) { - return false; - } - - LOG.warn("Parameter [{}] matches excluded pattern [{}]! See Accepted / Excluded patterns at\n" + - "https://struts.apache.org/security/#accepted--excluded-patterns", - paramName, result.getExcludedPattern()); - - return true; - } - - /** - * Checks if expression contains vulnerable code - * - * @param expression of interceptor - * @return true|false - */ - protected boolean isNotAcceptableExpression(String expression) { - return isExcluded(expression) || !isAccepted(expression); - } - - /** - * Sets a comma-delimited list of regular expressions to match - * parameters that are allowed in the parameter map (aka whitelist). - *

- * Don't change the default unless you know what you are doing in terms - * of security implications. - *

- * - * @param commaDelim A comma-delimited list of regular expressions - */ - public void setAcceptParamNames(String commaDelim) { - acceptedPatterns.setAcceptedPatterns(commaDelim); - } - - /** - * Sets a comma-delimited list of regular expressions to match - * parameters that should be removed from the parameter map. - * - * @param commaDelim A comma-delimited list of regular expressions - */ - public void setExcludeParams(String commaDelim) { - excludedPatterns.setExcludedPatterns(commaDelim); - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java deleted file mode 100644 index e61d4dc023..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionChainResult; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.ProxyUtil; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.StrutsConstants; -import org.apache.struts2.Unchainable; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; - - -/** - * - *

- * An interceptor that copies all the properties of every object in the value stack to the currently executing object, - * except for any object that implements {@link Unchainable}. A collection of optional includes and - * excludes may be provided to control how and which parameters are copied. Only includes or excludes may be - * specified. Specifying both results in undefined behavior. See the javadocs for {@link ReflectionProvider#copy(Object, Object, - * java.util.Map, java.util.Collection, java.util.Collection)} for more information. - *

- * - *

- * Note: It is important to remember that this interceptor does nothing if there are no objects already on the stack. - *
This means two things: - *
One, you can safely apply it to all your actions without any worry of adverse affects. - *
Two, it is up to you to ensure an object exists in the stack prior to invoking this action. The most typical way this is done - * is through the use of the chain result type, which combines with this interceptor to make up the action - * chaining feature. - *

- * - *

- * Note: By default Errors, Field errors and Message aren't copied during chaining, to change the behaviour you can specify - * the below three constants in struts.properties or struts.xml: - *

- * - *
    - *
  • struts.chaining.copyErrors - set to true to copy Action Errors
  • - *
  • struts.chaining.copyFieldErrors - set to true to copy Field Errors
  • - *
  • struts.chaining.copyMessages - set to true to copy Action Messages
  • - *
- * - *

- * Example: - *

- * - *
- * <constant name="struts.xwork.chaining.copyErrors" value="true"/>
- * 
- * - *

- * Note: By default actionErrors and actionMessages are excluded when copping object's properties. - *

- * - * Interceptor parameters: - * - *
    - *
  • excludes (optional) - the list of parameter names to exclude from copying (all others will be included).
  • - *
  • includes (optional) - the list of parameter names to include when copying (all others will be excluded).
  • - *
- * - * Extending the interceptor: - * - *

- * There are no known extension points to this interceptor. - *

- * - * Example code: - * - * - *
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="basicStack"/>
- *     <result name="success" type="chain">otherAction</result>
- * </action>
- * 
- * - *
- * <action name="otherAction" class="com.examples.OtherAction">
- *     <interceptor-ref name="chain"/>
- *     <interceptor-ref name="basicStack"/>
- *     <result name="success">good_result.ftl</result>
- * </action>
- * 
- * - * - * - * @author mrdon - * @author tm_jee ( tm_jee(at)yahoo.co.uk ) - * @see com.opensymphony.xwork2.ActionChainResult - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ChainingInterceptor} instead. - */ -@Deprecated -public class ChainingInterceptor extends AbstractInterceptor { - - private static final Logger LOG = LogManager.getLogger(ChainingInterceptor.class); - - private static final String ACTION_ERRORS = "actionErrors"; - private static final String FIELD_ERRORS = "fieldErrors"; - private static final String ACTION_MESSAGES = "actionMessages"; - - private boolean copyMessages = false; - private boolean copyErrors = false; - private boolean copyFieldErrors = false; - - protected Collection excludes; - - protected Collection includes; - protected ReflectionProvider reflectionProvider; - - @Inject - public void setReflectionProvider(ReflectionProvider prov) { - this.reflectionProvider = prov; - } - - @Inject(value = StrutsConstants.STRUTS_CHAINING_COPY_ERRORS, required = false) - public void setCopyErrors(String copyErrors) { - this.copyErrors = "true".equalsIgnoreCase(copyErrors); - } - - @Inject(value = StrutsConstants.STRUTS_CHAINING_COPY_FIELD_ERRORS, required = false) - public void setCopyFieldErrors(String copyFieldErrors) { - this.copyFieldErrors = "true".equalsIgnoreCase(copyFieldErrors); - } - - @Inject(value = StrutsConstants.STRUTS_CHAINING_COPY_MESSAGES, required = false) - public void setCopyMessages(String copyMessages) { - this.copyMessages = "true".equalsIgnoreCase(copyMessages); - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - ValueStack stack = invocation.getStack(); - CompoundRoot root = stack.getRoot(); - if (shouldCopyStack(invocation, root)) { - copyStack(invocation, root); - } - return invocation.invoke(); - } - - private void copyStack(ActionInvocation invocation, CompoundRoot root) { - List list = prepareList(root); - Map ctxMap = invocation.getInvocationContext().getContextMap(); - for (Object object : list) { - if (shouldCopy(object)) { - Object action = invocation.getAction(); - Class editable = null; - if(ProxyUtil.isProxy(action)) { - editable = ProxyUtil.ultimateTargetClass(action); - } - reflectionProvider.copy(object, action, ctxMap, prepareExcludes(), includes, editable); - } - } - } - - private Collection prepareExcludes() { - Collection localExcludes = excludes; - if (!copyErrors || !copyMessages ||!copyFieldErrors) { - if (localExcludes == null) { - localExcludes = new HashSet<>(); - if (!copyErrors) { - localExcludes.add(ACTION_ERRORS); - } - if (!copyMessages) { - localExcludes.add(ACTION_MESSAGES); - } - if (!copyFieldErrors) { - localExcludes.add(FIELD_ERRORS); - } - } - } - return localExcludes; - } - - private boolean shouldCopy(Object o) { - return o != null && !(o instanceof Unchainable); - } - - @SuppressWarnings("unchecked") - private List prepareList(CompoundRoot root) { - List list = new ArrayList(root); - list.remove(0); - Collections.reverse(list); - return list; - } - - private boolean shouldCopyStack(ActionInvocation invocation, CompoundRoot root) throws Exception { - Result result = invocation.getResult(); - return root.size() > 1 && (result == null || ActionChainResult.class.isAssignableFrom(result.getClass())); - } - - /** - * Gets list of parameter names to exclude - * - * @return the exclude list - */ - public Collection getExcludes() { - return excludes; - } - - /** - * Sets the list of parameter names to exclude from copying (all others will be included). - * - * @param excludes the excludes list as comma separated String - */ - public void setExcludes(String excludes) { - this.excludes = TextParseUtil.commaDelimitedStringToSet(excludes); - } - - /** - * Sets the list of parameter names to exclude from copying (all others will be included). - * - * @param excludes the excludes list - */ - public void setExcludesCollection(Collection excludes) { - this.excludes = excludes; - } - - /** - * Gets list of parameter names to include - * - * @return the include list - */ - public Collection getIncludes() { - return includes; - } - - /** - * Sets the list of parameter names to include when copying (all others will be excluded). - * - * @param includes the includes list as comma separated String - */ - public void setIncludes(String includes) { - this.includes = TextParseUtil.commaDelimitedStringToSet(includes); - } - - - /** - * Sets the list of parameter names to include when copying (all others will be excluded). - * - * @param includes the includes list - */ - public void setIncludesCollection(Collection includes) { - this.includes = includes; - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ConditionalInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ConditionalInterceptor.java deleted file mode 100644 index 0e83f64b2e..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ConditionalInterceptor.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.Interceptor} instead. - */ -@Deprecated -public interface ConditionalInterceptor extends org.apache.struts2.interceptor.ConditionalInterceptor, Interceptor { - - @Override - default boolean shouldIntercept(org.apache.struts2.ActionInvocation invocation) { - return shouldIntercept(ActionInvocation.adapt(invocation)); - } - - boolean shouldIntercept(ActionInvocation invocation); - - static ConditionalInterceptor adapt(org.apache.struts2.interceptor.ConditionalInterceptor actualInterceptor) { - if (actualInterceptor instanceof ConditionalInterceptor) { - return (ConditionalInterceptor) actualInterceptor; - } - return actualInterceptor != null ? new LegacyAdapter(actualInterceptor) : null; - } - - class LegacyAdapter extends Interceptor.LegacyAdapter implements ConditionalInterceptor { - - private final org.apache.struts2.interceptor.ConditionalInterceptor adaptee; - - private LegacyAdapter(org.apache.struts2.interceptor.ConditionalInterceptor adaptee) { - super(adaptee); - this.adaptee = adaptee; - } - - @Override - public boolean shouldIntercept(ActionInvocation invocation) { - return adaptee.shouldIntercept(invocation); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.java deleted file mode 100644 index 98be0de168..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.conversion.impl.ConversionData; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.util.ValueStack; -import org.apache.commons.text.StringEscapeUtils; -import org.apache.struts2.interceptor.ValidationAware; - -import java.util.HashMap; -import java.util.Map; - - -/** - * - * ConversionErrorInterceptor adds conversion errors from the ActionContext to the Action's field errors. - * - *

- * This interceptor adds any error found in the {@link ActionContext}'s conversionErrors map as a field error (provided - * that the action implements {@link ValidationAware}). In addition, any field that contains a validation error has its - * original value saved such that any subsequent requests for that value return the original value rather than the value - * in the action. This is important because if the value "abc" is submitted and can't be converted to an int, we want to - * display the original string ("abc") again rather than the int value (likely 0, which would make very little sense to - * the user). - *

- * - *

- * Note: Since 2.5.2, this interceptor extends {@link MethodFilterInterceptor}, therefore being - * able to deal with excludeMethods / includeMethods parameters. See [Workflow Interceptor] - * (class {@link DefaultWorkflowInterceptor}) for documentation and examples on how to use this feature. - *

- * - * - * - *

Interceptor parameters:

- * - * - * - *
    - *
  • None
  • - *
- * - * - * - *

Extending the interceptor:

- * - * - * - * Because this interceptor is not web-specific, it abstracts the logic for whether an error should be added. This - * allows for web-specific interceptors to use more complex logic in the {@link #shouldAddError} method for when a value - * has a conversion error but is null or empty or otherwise indicates that the value was never actually entered by the - * user. - * - * - * - *

Example code:

- * - *
- * 
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="params"/>
- *     <interceptor-ref name="conversionError"/>
- *     <result name="success">good_result.ftl</result>
- * </action>
- * 
- * 
- * - * @author Jason Carreira - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ConversionErrorInterceptor} instead. - */ -@Deprecated -public class ConversionErrorInterceptor extends MethodFilterInterceptor { - - public static final String ORIGINAL_PROPERTY_OVERRIDE = "original.property.override"; - - protected Object getOverrideExpr(ActionInvocation invocation, Object value) { - return escape(value); - } - - protected String escape(Object value) { - return "\"" + StringEscapeUtils.escapeJava(String.valueOf(value)) + "\""; - } - - @Override - public String doIntercept(ActionInvocation invocation) throws Exception { - - ActionContext invocationContext = invocation.getInvocationContext(); - Map conversionErrors = invocationContext.getConversionErrors(); - ValueStack stack = invocationContext.getValueStack(); - - HashMap fakie = null; - - for (Map.Entry entry : conversionErrors.entrySet()) { - String propertyName = entry.getKey(); - ConversionData conversionData = entry.getValue(); - - if (shouldAddError(propertyName, conversionData.getValue())) { - String message = XWorkConverter.getConversionErrorMessage(propertyName, conversionData.getToClass(), stack); - - Object action = invocation.getAction(); - if (action instanceof ValidationAware va) { - va.addFieldError(propertyName, message); - } - - if (fakie == null) { - fakie = new HashMap<>(); - } - - fakie.put(propertyName, getOverrideExpr(invocation, conversionData.getValue())); - } - } - - if (fakie != null) { - // if there were some errors, put the original (fake) values in place right before the result - stack.getContext().put(ORIGINAL_PROPERTY_OVERRIDE, fakie); - invocation.addPreResultListener((invocation1, resultCode) -> { - var fakie1 = (Map) invocation1.getInvocationContext().get(ORIGINAL_PROPERTY_OVERRIDE); - - if (fakie1 != null) { - invocation1.getStack().setExprOverrides(fakie1); - } - }); - } - return invocation.invoke(); - } - - protected boolean shouldAddError(String propertyName, Object value) { - return true; - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java deleted file mode 100644 index b590ca4af4..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.annotations.InputConfig; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.reflect.MethodUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.interceptor.ValidationAware; -import org.apache.struts2.interceptor.ValidationErrorAware; -import org.apache.struts2.interceptor.ValidationWorkflowAware; - -import java.io.Serial; - -/** - * - *

- * An interceptor that makes sure there are not validation, conversion or action errors before allowing the interceptor chain to continue. - * If a single FieldError or ActionError (including the ones replicated by the Message Store Interceptor in a redirection) is found, the INPUT result will be triggered. - * This interceptor does not perform any validation. - *

- * - *

- * This interceptor does nothing if the name of the method being invoked is specified in the excludeMethods - * parameter. excludeMethods accepts a comma-delimited list of method names. For example, requests to - * foo!input.action and foo!back.action will be skipped by this interceptor if you set the - * excludeMethods parameter to "input, back". - *

- * - *

- * Note: As this method extends off MethodFilterInterceptor, it is capable of - * deciding if it is applicable only to selective methods in the action class. This is done by adding param tags - * for the interceptor element, naming either a list of excluded method names and/or a list of included method - * names, whereby includeMethods overrides excludedMethods. A single * sign is interpreted as wildcard matching - * all methods for both parameters. - * See {@link MethodFilterInterceptor} for more info. - *

- * - *

- * This interceptor also supports the following interfaces which can implemented by actions: - *

- * - *
    - *
  • ValidationAware - implemented by ActionSupport class
  • - *
  • ValidationWorkflowAware - allows changing result name programmatically
  • - *
  • ValidationErrorAware - notifies action about errors and also allow change result name
  • - *
- * - *

- * You can also use InputConfig annotation to change result name returned when validation errors occurred. - *

- * - * - * - *

Interceptor parameters:

- * - * - *
    - *
  • inputResultName - Default to "input". Determine the result name to be returned when - * an action / field error is found.
  • - *
- * - * - *

Extending the interceptor:

- * - * - * - *

There are no known extension points for this interceptor.

- * - * - * - *

Example code:

- * - *
- * 
- *
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="params"/>
- *     <interceptor-ref name="validation"/>
- *     <interceptor-ref name="workflow"/>
- *     <result name="success">good_result.ftl</result>
- * </action>
- *
- * <-- In this case myMethod as well as mySecondMethod of the action class
- *        will not pass through the workflow process -->
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="params"/>
- *     <interceptor-ref name="validation"/>
- *     <interceptor-ref name="workflow">
- *         <param name="excludeMethods">myMethod,mySecondMethod</param>
- *     </interceptor-ref name="workflow">
- *     <result name="success">good_result.ftl</result>
- * </action>
- *
- * <-- In this case, the result named "error" will be used when
- *        an action / field error is found -->
- * <-- The Interceptor will only be applied for myWorkflowMethod method of action
- *        classes, since this is the only included method while any others are excluded -->
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="params"/>
- *     <interceptor-ref name="validation"/>
- *     <interceptor-ref name="workflow">
- *        <param name="inputResultName">error</param>
- *         <param name="excludeMethods">*</param>
- *         <param name="includeMethods">myWorkflowMethod</param>
- *     </interceptor-ref>
- *     <result name="success">good_result.ftl</result>
- * </action>
- *
- * 
- * 
- * - * @author Jason Carreira - * @author Rainer Hermanns - * @author Alexandru Popescu - * @author Philip Luppens - * @author tm_jee - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.DefaultWorkflowInterceptor} instead. - */ -@Deprecated -public class DefaultWorkflowInterceptor extends MethodFilterInterceptor { - - @Serial - private static final long serialVersionUID = 7563014655616490865L; - - private static final Logger LOG = LogManager.getLogger(DefaultWorkflowInterceptor.class); - - private static final Class[] EMPTY_CLASS_ARRAY = new Class[0]; - - private String inputResultName = Action.INPUT; - - /** - * Set the inputResultName (result name to be returned when - * a action / field error is found registered). Default to {@link Action#INPUT} - * - * @param inputResultName what result name to use when there was validation error(s). - */ - public void setInputResultName(String inputResultName) { - this.inputResultName = inputResultName; - } - - /** - * Intercept {@link ActionInvocation} and returns a inputResultName - * when action / field errors is found registered. - * - * @param invocation the action invocation - * @return String result name - */ - @Override - protected String doIntercept(ActionInvocation invocation) throws Exception { - Object action = invocation.getAction(); - - if (action instanceof ValidationAware validationAwareAction) { - - if (validationAwareAction.hasErrors()) { - LOG.debug("Errors on action [{}], returning result name [{}]", validationAwareAction, inputResultName); - - String resultName = inputResultName; - resultName = processValidationWorkflowAware(action, resultName); - resultName = processInputConfig(action, invocation.getProxy().getMethod(), resultName); - resultName = processValidationErrorAware(action, resultName); - - return resultName; - } - } - - return invocation.invoke(); - } - - /** - * Process {@link ValidationWorkflowAware} interface - * - * @param action action object - * @param currentResultName current result name - * - * @return result name - */ - private String processValidationWorkflowAware(final Object action, final String currentResultName) { - String resultName = currentResultName; - if (action instanceof ValidationWorkflowAware) { - resultName = ((ValidationWorkflowAware) action).getInputResultName(); - LOG.debug("Changing result name from [{}] to [{}] because of processing [{}] interface applied to [{}]", - currentResultName, resultName, ValidationWorkflowAware.class.getSimpleName(), action); - } - return resultName; - } - - /** - * Process {@link InputConfig} annotation applied to method - * @param action action object - * @param method method - * @param currentResultName current result name - * - * @return result name - * - * @throws Exception in case of any errors - */ - protected String processInputConfig(final Object action, final String method, final String currentResultName) throws Exception { - String resultName = currentResultName; - InputConfig annotation = MethodUtils.getAnnotation(action.getClass().getMethod(method, EMPTY_CLASS_ARRAY), - InputConfig.class ,true,true); - if (annotation != null) { - if (StringUtils.isNotEmpty(annotation.methodName())) { - resultName = (String) MethodUtils.invokeMethod(action, true, annotation.methodName()); - } else { - resultName = annotation.resultName(); - } - LOG.debug("Changing result name from [{}] to [{}] because of processing annotation [{}] on action [{}]", - currentResultName, resultName, InputConfig.class.getSimpleName(), action); - } - return resultName; - } - - /** - * Notify action if it implements {@link ValidationErrorAware} interface - * - * @param action action object - * @param currentResultName current result name - * - * @return result name - * @see ValidationErrorAware - */ - protected String processValidationErrorAware(final Object action, final String currentResultName) { - String resultName = currentResultName; - if (action instanceof ValidationErrorAware) { - resultName = ((ValidationErrorAware) action).actionErrorOccurred(currentResultName); - LOG.debug("Changing result name from [{}] to [{}] because of processing interface [{}] on action [{}]", - currentResultName, resultName, ValidationErrorAware.class.getSimpleName(), action); - } - return resultName; - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java deleted file mode 100644 index 51eed9426d..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.dispatcher.HttpParameters; - -import java.util.List; -import java.util.Map; - -/** - * - *

- * This interceptor forms the core functionality of the exception handling feature. Exception handling allows you to map - * an exception to a result code, just as if the action returned a result code instead of throwing an unexpected - * exception. When an exception is encountered, it is wrapped with an {@link ExceptionHolder} and pushed on the stack, - * providing easy access to the exception from within your result. - *

- * - *

- * Note: While you can configure exception mapping in your configuration file at any point, the configuration - * will not have any effect if this interceptor is not in the interceptor stack for your actions. It is recommended that - * you make this interceptor the first interceptor on the stack, ensuring that it has full access to catch any - * exception, even those caused by other interceptors. - *

- * - * - * - *

Interceptor parameters:

- * - * - * - *
    - * - *
  • logEnabled (optional) - Should exceptions also be logged? (boolean true|false)
  • - * - *
  • logLevel (optional) - what log level should we use (trace, debug, info, warn, error, fatal)? - defaut is debug
  • - * - *
  • logCategory (optional) - If provided we would use this category (eg. com.mycompany.app). - * Default is to use com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.
  • - * - *
- * - *

- * The parameters above enables us to log all thrown exceptions with stacktace in our own logfile, - * and present a friendly webpage (with no stacktrace) to the end user. - *

- * - * - * - *

Extending the interceptor:

- * - * - *

- * If you want to add custom handling for publishing the Exception, you may override - * {@link #publishException(com.opensymphony.xwork2.ActionInvocation, ExceptionHolder)}. The default implementation - * pushes the given ExceptionHolder on value stack. A custom implementation could add additional logging etc. - *

- * - * - *

Example code:

- * - *
- * 
- * <xwork>
- *     <package name="default" extends="xwork-default">
- *         <global-results>
- *             <result name="error" type="freemarker">error.ftl</result>
- *         </global-results>
- *
- *         <global-exception-mappings>
- *             <exception-mapping exception="java.lang.Exception" result="error"/>
- *         </global-exception-mappings>
- *
- *         <action name="test">
- *             <interceptor-ref name="exception"/>
- *             <interceptor-ref name="basicStack"/>
- *             <exception-mapping exception="com.acme.CustomException" result="custom_error"/>
- *             <result name="custom_error">custom_error.ftl</result>
- *             <result name="success" type="freemarker">test.ftl</result>
- *         </action>
- *     </package>
- * </xwork>
- * 
- * 
- * - *

- * This second example will also log the exceptions using our own category - * com.mycompany.app.unhandled at WARN level. - *

- * - *
- * 
- * <xwork>
- *   <package name="something" extends="xwork-default">
- *      <interceptors>
- *          <interceptor-stack name="exceptionmappingStack">
- *              <interceptor-ref name="exception">
- *                  <param name="logEnabled">true</param>
- *                  <param name="logCategory">com.mycompany.app.unhandled</param>
- *                  <param name="logLevel">WARN</param>
- *              </interceptor-ref>
- *              <interceptor-ref name="i18n"/>
- *              <interceptor-ref name="staticParams"/>
- *              <interceptor-ref name="params"/>
- *              <interceptor-ref name="validation">
- *                  <param name="excludeMethods">input,back,cancel,browse</param>
- *              </interceptor-ref>
- *          </interceptor-stack>
- *      </interceptors>
- *
- *      <default-interceptor-ref name="exceptionmappingStack"/>
- *
- *      <global-results>
- *           <result name="unhandledException">/unhandled-exception.jsp</result>
- *      </global-results>
- *
- *      <global-exception-mappings>
- *           <exception-mapping exception="java.lang.Exception" result="unhandledException"/>
- *      </global-exception-mappings>
- *
- *      <action name="exceptionDemo" class="org.apache.struts2.showcase.exceptionmapping.ExceptionMappingAction">
- *          <exception-mapping exception="org.apache.struts2.showcase.exceptionmapping.ExceptionMappingException"
- *                             result="damm"/>
- *          <result name="input">index.jsp</result>
- *          <result name="success">success.jsp</result>
- *          <result name="damm">damm.jsp</result>
- *      </action>
- *
- *   </package>
- * </xwork>
- * 
- * 
- * - * @author Matthew E. Porter (matthew dot porter at metissian dot com) - * @author Claus Ibsen - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ExceptionMappingInterceptor} instead. - */ -@Deprecated -public class ExceptionMappingInterceptor extends AbstractInterceptor { - - private static final Logger LOG = LogManager.getLogger(ExceptionMappingInterceptor.class); - - protected Logger categoryLogger; - protected boolean logEnabled = false; - protected String logCategory; - protected String logLevel; - - - public boolean isLogEnabled() { - return logEnabled; - } - - public void setLogEnabled(boolean logEnabled) { - this.logEnabled = logEnabled; - } - - public String getLogCategory() { - return logCategory; - } - - public void setLogCategory(String logCatgory) { - this.logCategory = logCatgory; - } - - public String getLogLevel() { - return logLevel; - } - - public void setLogLevel(String logLevel) { - this.logLevel = logLevel; - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - String result; - - try { - result = invocation.invoke(); - } catch (Exception e) { - if (isLogEnabled()) { - handleLogging(e); - } - List exceptionMappings = invocation.getProxy().getConfig().getExceptionMappings(); - ExceptionMappingConfig mappingConfig = this.findMappingFromExceptions(exceptionMappings, e); - if (mappingConfig != null && mappingConfig.getResult()!=null) { - Map mappingParams = mappingConfig.getParams(); - // create a mutable HashMap since some interceptors will remove parameters, and parameterMap is immutable - HttpParameters parameters = HttpParameters.create(mappingParams).build(); - invocation.getInvocationContext().withParameters(parameters); - result = mappingConfig.getResult(); - publishException(invocation, new ExceptionHolder(e)); - } else { - throw e; - } - } - - return result; - } - - /** - * Handles the logging of the exception. - * - * @param e the exception to log. - */ - protected void handleLogging(Exception e) { - if (logCategory != null) { - if (categoryLogger == null) { - // init category logger - categoryLogger = LogManager.getLogger(logCategory); - } - doLog(categoryLogger, e); - } else { - doLog(LOG, e); - } - } - - /** - * Performs the actual logging. - * - * @param logger the provided logger to use. - * @param e the exception to log. - */ - protected void doLog(Logger logger, Exception e) { - if (logLevel == null) { - logger.debug(e.getMessage(), e); - return; - } - - if ("trace".equalsIgnoreCase(logLevel)) { - logger.trace(e.getMessage(), e); - } else if ("debug".equalsIgnoreCase(logLevel)) { - logger.debug(e.getMessage(), e); - } else if ("info".equalsIgnoreCase(logLevel)) { - logger.info(e.getMessage(), e); - } else if ("warn".equalsIgnoreCase(logLevel)) { - logger.warn(e.getMessage(), e); - } else if ("error".equalsIgnoreCase(logLevel)) { - logger.error(e.getMessage(), e); - } else if ("fatal".equalsIgnoreCase(logLevel)) { - logger.fatal(e.getMessage(), e); - } else { - throw new IllegalArgumentException("LogLevel [" + logLevel + "] is not supported"); - } - } - - /** - * Try to find appropriate {@link ExceptionMappingConfig} based on provided Throwable - * - * @param exceptionMappings list of defined exception mappings - * @param t caught exception - * @return appropriate mapping or null - */ - protected ExceptionMappingConfig findMappingFromExceptions(List exceptionMappings, Throwable t) { - ExceptionMappingConfig config = null; - // Check for specific exception mappings. - if (exceptionMappings != null) { - int deepest = Integer.MAX_VALUE; - for (ExceptionMappingConfig exceptionMapping : exceptionMappings) { - int depth = getDepth(exceptionMapping.getExceptionClassName(), t); - if (depth >= 0 && depth < deepest) { - deepest = depth; - config = exceptionMapping; - } - } - } - return config; - } - - /** - * Return the depth to the superclass matching. 0 means ex matches exactly. Returns -1 if there's no match. - * Otherwise, returns depth. Lowest depth wins. - * - * @param exceptionMapping the mapping classname - * @param t the cause - * @return the depth, if not found -1 is returned. - */ - public int getDepth(String exceptionMapping, Throwable t) { - return getDepth(exceptionMapping, t.getClass(), 0); - } - - private int getDepth(String exceptionMapping, Class exceptionClass, int depth) { - if (exceptionClass.getName().contains(exceptionMapping)) { - // Found it! - return depth; - } - // If we've gone as far as we can go and haven't found it... - if (exceptionClass.equals(Throwable.class)) { - return -1; - } - return getDepth(exceptionMapping, exceptionClass.getSuperclass(), depth + 1); - } - - /** - * Default implementation to handle ExceptionHolder publishing. Pushes given ExceptionHolder on the stack. - * Subclasses may override this to customize publishing. - * - * @param invocation The invocation to publish Exception for. - * @param exceptionHolder The exceptionHolder wrapping the Exception to publish. - */ - protected void publishException(ActionInvocation invocation, ExceptionHolder exceptionHolder) { - invocation.getStack().push(exceptionHolder); - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java deleted file mode 100644 index 4287ca8c0a..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.Interceptor} instead. - */ -@Deprecated -public interface Interceptor extends org.apache.struts2.interceptor.Interceptor { - - @Override - default String intercept(org.apache.struts2.ActionInvocation invocation) throws Exception { - return intercept(ActionInvocation.adapt(invocation)); - } - - String intercept(ActionInvocation invocation) throws Exception; - - static Interceptor adapt(org.apache.struts2.interceptor.Interceptor actualInterceptor) { - if (actualInterceptor instanceof org.apache.struts2.interceptor.ConditionalInterceptor) { - return ConditionalInterceptor.adapt((org.apache.struts2.interceptor.ConditionalInterceptor) actualInterceptor); - } - if (actualInterceptor instanceof Interceptor) { - return (Interceptor) actualInterceptor; - } - return actualInterceptor != null ? new LegacyAdapter(actualInterceptor) : null; - } - - class LegacyAdapter implements Interceptor { - - private final org.apache.struts2.interceptor.Interceptor adaptee; - - protected LegacyAdapter(org.apache.struts2.interceptor.Interceptor adaptee) { - this.adaptee = adaptee; - } - - public org.apache.struts2.interceptor.Interceptor getAdaptee() { - return adaptee; - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - return adaptee.intercept(invocation); - } - - @Override - public void destroy() { - adaptee.destroy(); - } - - @Override - public void init() { - adaptee.init(); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java deleted file mode 100644 index f43fb19864..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - - -/** - * - *

- * This interceptor logs the start and end of the execution an action (in English-only, not internationalized). - *
- * Note:: This interceptor will log at INFO level. - *

- * - * - * - * There are no parameters for this interceptor. - * - * - * - * There are no obvious extensions to the existing interceptor. - * - * - *
- * 
- * <!-- prints out a message before and after the immediate action execution -->
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="completeStack"/>
- *     <interceptor-ref name="logger"/>
- *     <result name="success">good_result.ftl</result>
- * </action>
- *
- * <!-- prints out a message before any more interceptors continue and after they have finished -->
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="logger"/>
- *     <interceptor-ref name="completeStack"/>
- *     <result name="success">good_result.ftl</result>
- * </action>
- * 
- * 
- * - * @author Jason Carreira - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.LoggingInterceptor} instead. - */ -@Deprecated -public class LoggingInterceptor extends AbstractInterceptor { - private static final Logger LOG = LogManager.getLogger(LoggingInterceptor.class); - private static final String FINISH_MESSAGE = "Finishing execution stack for action "; - private static final String START_MESSAGE = "Starting execution stack for action "; - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - logMessage(invocation, START_MESSAGE); - String result = invocation.invoke(); - logMessage(invocation, FINISH_MESSAGE); - return result; - } - - private void logMessage(ActionInvocation invocation, String baseMessage) { - if (LOG.isInfoEnabled()) { - StringBuilder message = new StringBuilder(baseMessage); - String namespace = invocation.getProxy().getNamespace(); - - if (namespace != null && !namespace.trim().isEmpty()) { - message.append(namespace).append("/"); - } - - message.append(invocation.getProxy().getActionName()); - LOG.info(message.toString()); - } - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java deleted file mode 100644 index bcce3da12d..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.util.TextParseUtil; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import java.util.Collections; -import java.util.Set; - -/** - * - * - *

- * MethodFilterInterceptor is an abstract Interceptor used as - * a base class for interceptors that will filter execution based on method - * names according to specified included/excluded method lists. - * - *

- * - * Settable parameters are as follows: - * - *
    - *
  • excludeMethods - method names to be excluded from interceptor processing
  • - *
  • includeMethods - method names to be included in interceptor processing
  • - *
- * - *

- * - * NOTE: If method name are available in both includeMethods and - * excludeMethods, it will be considered as an included method: - * includeMethods takes precedence over excludeMethods. - * - *

- * - * Interceptors that extends this capability include: - * - *
    - *
  • TokenInterceptor
  • - *
  • TokenSessionStoreInterceptor
  • - *
  • DefaultWorkflowInterceptor
  • - *
  • ValidationInterceptor
  • - *
- * - * - * - * @author Alexandru Popescu - * @author Rainer Hermanns - * - * @see org.apache.struts2.interceptor.TokenInterceptor - * @see org.apache.struts2.interceptor.TokenSessionStoreInterceptor - * @see com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor - * @see com.opensymphony.xwork2.validator.ValidationInterceptor - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.MethodFilterInterceptor} instead. - */ -@Deprecated -public abstract class MethodFilterInterceptor extends AbstractInterceptor { - - private static final Logger LOG = LogManager.getLogger(MethodFilterInterceptor.class); - - protected Set excludeMethods = Collections.emptySet(); - protected Set includeMethods = Collections.emptySet(); - - public void setExcludeMethods(String excludeMethods) { - this.excludeMethods = TextParseUtil.commaDelimitedStringToSet(excludeMethods); - } - - public Set getExcludeMethodsSet() { - return excludeMethods; - } - - public void setIncludeMethods(String includeMethods) { - this.includeMethods = TextParseUtil.commaDelimitedStringToSet(includeMethods); - } - - public Set getIncludeMethodsSet() { - return includeMethods; - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - if (applyInterceptor(invocation)) { - return doIntercept(invocation); - } - return invocation.invoke(); - } - - protected boolean applyInterceptor(ActionInvocation invocation) { - String method = invocation.getProxy().getMethod(); - // ValidationInterceptor - boolean applyMethod = MethodFilterInterceptorUtil.applyMethod(excludeMethods, includeMethods, method); - if (!applyMethod) { - LOG.debug("Skipping Interceptor... Method [{}] found in exclude list.", method); - } - return applyMethod; - } - - /** - * Subclasses must override to implement the interceptor logic. - * - * @param invocation the action invocation - * @return the result of invocation - * @throws Exception in case of any errors - */ - protected abstract String doIntercept(ActionInvocation invocation) throws Exception; - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java deleted file mode 100644 index 7e1a2c4348..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.MethodFilterInterceptorUtil} instead. - */ -@Deprecated -public class MethodFilterInterceptorUtil extends org.apache.struts2.interceptor.MethodFilterInterceptorUtil { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java deleted file mode 100644 index e3135a18c3..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.ValueStack; -import org.apache.struts2.ModelDriven; - -/** - * - * - * Watches for {@link ModelDriven} actions and adds the action's model on to the value stack. - * - *

Note: The ModelDrivenInterceptor must come before the both {@link StaticParametersInterceptor} and - * {@link org.apache.struts2.interceptor.parameter.ParametersInterceptor} if you want the parameters to be applied to - * the model. - *

- *

Note: The ModelDrivenInterceptor will only push the model into the stack when the - * model is not null, else it will be ignored. - *

- * - * - * - *

Interceptor parameters:

- * - * - * - *
    - * - *
  • refreshModelBeforeResult - set to true if you want the model to be refreshed on the value stack after action - * execution and before result execution. The setting is useful if you want to change the model instance during the - * action execution phase, like when loading it from the data layer. This will result in getModel() being called at - * least twice.
  • - * - *
- * - * - * - *

Extending the interceptor:

- * - * - * - * There are no known extension points to this interceptor. - * - * - * - *

Example code:

- * - *
- * 
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="modelDriven"/>
- *     <interceptor-ref name="basicStack"/>
- *     <result name="success">good_result.ftl</result>
- * </action>
- * 
- * 
- * - * @author tm_jee - * @version $Date$ $Id$ - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ModelDrivenInterceptor} instead. - */ -@Deprecated -public class ModelDrivenInterceptor extends AbstractInterceptor { - - protected boolean refreshModelBeforeResult = false; - - public void setRefreshModelBeforeResult(boolean val) { - this.refreshModelBeforeResult = val; - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - Object action = invocation.getAction(); - - if (action instanceof ModelDriven modelDriven) { - ValueStack stack = invocation.getStack(); - Object model = modelDriven.getModel(); - if (model != null) { - stack.push(model); - } - if (refreshModelBeforeResult) { - invocation.addPreResultListener(new RefreshModelBeforeResult(modelDriven, model)); - } - } - return invocation.invoke(); - } - - /** - * Refreshes the model instance on the value stack, if it has changed - */ - protected static class RefreshModelBeforeResult implements PreResultListener { - private final Object originalModel; - protected ModelDriven action; - - - public RefreshModelBeforeResult(ModelDriven action, Object model) { - this.originalModel = model; - this.action = action; - } - - public void beforeResult(ActionInvocation invocation, String resultCode) { - ValueStack stack = invocation.getStack(); - CompoundRoot root = stack.getRoot(); - - boolean needsRefresh = true; - Object newModel = action.getModel(); - - // Check to see if the new model instance is already on the stack - if (newModel != null) { - for (Object item : root) { - if (item == newModel) { - needsRefresh = false; - break; - } - } - } - - // Add the new model on the stack - if (needsRefresh) { - - // Clear off the old model instance - if (originalModel != null) { - root.remove(originalModel); - } - if (newModel != null) { - stack.push(newModel); - } - } - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptor.java deleted file mode 100644 index f33ebf6e27..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptor.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.util.TextParseUtil; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.action.NoParameters; -import org.apache.struts2.dispatcher.HttpParameters; -import org.apache.struts2.dispatcher.Parameter; - -import java.util.Collections; -import java.util.Set; - -/** - * This is a simple XWork interceptor that allows parameters (matching - * one of the paramNames attribute csv value) to be - * removed from the parameter map if they match a certain value - * (matching one of the paramValues attribute csv value), before they - * are set on the action. A typical usage would be to want a dropdown/select - * to map onto a boolean value on an action. The select had the options - * none, yes and no with values -1, true and false. The true and false would - * map across correctly. However the -1 would be set to false. - * This was not desired as one might needed the value on the action to stay null. - * This interceptor fixes this by preventing the parameter from ever reaching - * the action. - * - *
    - *
  • paramNames - A comma separated value (csv) indicating the parameter name - * whose param value should be considered that if they match any of the - * comma separated value (csv) from paramValues attribute, shall be - * removed from the parameter map such that they will not be applied - * to the action
  • - *
  • paramValues - A comma separated value (csv) indicating the parameter value that if - * matched shall have its parameter be removed from the parameter map - * such that they will not be applied to the action
  • - *
- *

- * No intended extension point - * - *

- * <action name="sample" class="org.martingilday.Sample">
- * 	<interceptor-ref name="paramRemover">
- *          <param name="paramNames">aParam,anotherParam</param>
- *          <param name="paramValues">--,-1</param>
- * 	</interceptor-ref>
- * 	<interceptor-ref name="defaultStack" />
- * 	...
- * </action>
- * 
- * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ParameterRemoverInterceptor} instead. - */ -@Deprecated -public class ParameterRemoverInterceptor extends AbstractInterceptor { - - private static final Logger LOG = LogManager.getLogger(ParameterRemoverInterceptor.class); - - private Set paramNames = Collections.emptySet(); - private Set paramValues = Collections.emptySet(); - - /** - * Decide if the parameter should be removed from the parameter map based on - * paramNames and paramValues. - * - * @see com.opensymphony.xwork2.interceptor.AbstractInterceptor - */ - @Override - public String intercept(ActionInvocation invocation) throws Exception { - if (!(invocation.getAction() instanceof NoParameters) - && (null != this.paramNames)) { - ActionContext ac = invocation.getInvocationContext(); - HttpParameters parameters = ac.getParameters(); - - if (parameters != null) { - for (String removeName : paramNames) { - try { - Parameter parameter = parameters.get(removeName); - if (parameter.isDefined() && this.paramValues.contains(parameter.getValue())) { - parameters.remove(removeName); - } - } catch (Exception e) { - LOG.error("Failed to convert parameter to string", e); - } - } - } - } - return invocation.invoke(); - } - - /** - * Allows paramNames attribute to be set as comma-separated-values (csv). - * - * @param paramNames the paramNames to set - */ - public void setParamNames(String paramNames) { - this.paramNames = TextParseUtil.commaDelimitedStringToSet(paramNames); - } - - /** - * Allows paramValues attribute to be set as a comma-separated-values (csv). - * - * @param paramValues the paramValues to set - */ - public void setParamValues(String paramValues) { - this.paramValues = TextParseUtil.commaDelimitedStringToSet(paramValues); - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/PreResultListener.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/PreResultListener.java deleted file mode 100644 index 25ba59a42c..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/PreResultListener.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; - -/** - * {@inheritDoc} - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.PreResultListener} instead. - */ -@Deprecated -public interface PreResultListener extends org.apache.struts2.interceptor.PreResultListener { - - @Override - default void beforeResult(org.apache.struts2.ActionInvocation invocation, String resultCode) { - beforeResult(ActionInvocation.adapt(invocation), resultCode); - } - - void beforeResult(ActionInvocation invocation, String resultCode); - - static PreResultListener adapt(org.apache.struts2.interceptor.PreResultListener actualListener) { - if (actualListener instanceof PreResultListener) { - return (PreResultListener) actualListener; - } - return actualListener != null ? new LegacyAdapter(actualListener) : null; - } - - class LegacyAdapter implements PreResultListener { - - private final org.apache.struts2.interceptor.PreResultListener adaptee; - - private LegacyAdapter(org.apache.struts2.interceptor.PreResultListener adaptee) { - this.adaptee = adaptee; - } - - @Override - public void beforeResult(ActionInvocation invocation, String resultCode) { - adaptee.beforeResult(invocation, resultCode); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/PrepareInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/PrepareInterceptor.java deleted file mode 100644 index e617ec2b59..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/PrepareInterceptor.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionInvocation; -import org.apache.struts2.Preparable; - -import java.io.Serial; -import java.lang.reflect.InvocationTargetException; - -/** - * - * - * This interceptor calls prepare() on actions which implement - * {@link Preparable}. This interceptor is very useful for any situation where - * you need to ensure some logic runs before the actual execute method runs. - * - *

- * A typical use of this is to run some logic to load an object from the - * database so that when parameters are set they can be set on this object. For - * example, suppose you have a User object with two properties: id and - * name. Provided that the params interceptor is called twice (once - * before and once after this interceptor), you can load the User object using - * the id property, and then when the second params interceptor is called the - * parameter user.name will be set, as desired, on the actual object - * loaded from the database. See the example for more info. - *

- *

- * Note: Since XWork 2.0.2, this interceptor extends {@link MethodFilterInterceptor}, therefore being - * able to deal with excludeMethods / includeMethods parameters. See [Workflow Interceptor] - * (class {@link DefaultWorkflowInterceptor}) for documentation and examples on how to use this feature. - *

- * - *

- * Update: Added logic to execute a prepare{MethodName} and conditionally - * the a general prepare() Method, depending on the 'alwaysInvokePrepare' parameter/property - * which is by default true. This allows us to run some logic based on the method - * name we specify in the {@link com.opensymphony.xwork2.ActionProxy}. For example, you can specify a - * prepareInput() method that will be run before the invocation of the input method. - *

- * - * - * - *

Interceptor parameters:

- * - * - * - *
    - * - *
  • alwaysInvokePrepare - Default to true. If true, prepare will always be invoked, - * otherwise it will not.
  • - * - *
- * - * - * - *

Extending the interceptor:

- * - * - * - * There are no known extension points to this interceptor. - * - * - * - *

Example code:

- * - *
- * 
- * <!-- Calls the params interceptor twice, allowing you to
- *       pre-load data for the second time parameters are set -->
- *  <action name="someAction" class="com.examples.SomeAction">
- *      <interceptor-ref name="params"/>
- *      <interceptor-ref name="prepare"/>
- *      <interceptor-ref name="basicStack"/>
- *      <result name="success">good_result.ftl</result>
- *  </action>
- * 
- * 
- * - * @author Jason Carreira - * @author Philip Luppens - * @author tm_jee - * @see com.opensymphony.xwork2.Preparable - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.PrepareInterceptor} instead. - */ -@Deprecated -public class PrepareInterceptor extends MethodFilterInterceptor { - - @Serial - private static final long serialVersionUID = -5216969014510719786L; - - private final static String PREPARE_PREFIX = "prepare"; - private final static String ALT_PREPARE_PREFIX = "prepareDo"; - - private boolean alwaysInvokePrepare = true; - private boolean firstCallPrepareDo = false; - - /** - * Sets if the prepare method should always be executed. - *

- * Default is true. - *

- * - * @param alwaysInvokePrepare if prepare should always be executed or not. - */ - public void setAlwaysInvokePrepare(String alwaysInvokePrepare) { - this.alwaysInvokePrepare = Boolean.parseBoolean(alwaysInvokePrepare); - } - - /** - * Sets if the prepareDoXXX method should be called first - *

- * Default is false for backward compatibility - *

- * @param firstCallPrepareDo if prepareDoXXX should be called first - */ - public void setFirstCallPrepareDo(String firstCallPrepareDo) { - this.firstCallPrepareDo = Boolean.parseBoolean(firstCallPrepareDo); - } - - @Override - public String doIntercept(ActionInvocation invocation) throws Exception { - Object action = invocation.getAction(); - - if (action instanceof Preparable) { - try { - String[] prefixes; - if (firstCallPrepareDo) { - prefixes = new String[] {ALT_PREPARE_PREFIX, PREPARE_PREFIX}; - } else { - prefixes = new String[] {PREPARE_PREFIX, ALT_PREPARE_PREFIX}; - } - PrefixMethodInvocationUtil.invokePrefixMethod(invocation, prefixes); - } - catch (InvocationTargetException e) { - /* - * The invoked method threw an exception and reflection wrapped it - * in an InvocationTargetException. - * If possible re-throw the original exception so that normal - * exception handling will take place. - */ - Throwable cause = e.getCause(); - if (cause instanceof Exception) { - throw (Exception) cause; - } else if(cause instanceof Error) { - throw (Error) cause; - } else { - /* - * The cause is not an Exception or Error (must be Throwable) so - * just re-throw the wrapped exception. - */ - throw e; - } - } - - if (alwaysInvokePrepare) { - ((Preparable) action).prepare(); - } - } - - return invocation.invoke(); - } - -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java deleted file mode 100644 index d5413b4e59..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ModelDriven; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ScopedModelDriven} instead. - */ -@Deprecated -public interface ScopedModelDriven extends org.apache.struts2.interceptor.ScopedModelDriven, ModelDriven { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDrivenInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDrivenInterceptor.java deleted file mode 100644 index dbb422ca95..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDrivenInterceptor.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.inject.Inject; -import org.apache.struts2.StrutsException; -import org.apache.struts2.interceptor.ScopedModelDriven; - -import java.lang.reflect.Method; -import java.util.Map; - -/** - * - * - * An interceptor that enables scoped model-driven actions. - * - *

This interceptor only activates on actions that implement the {@link ScopedModelDriven} interface. If - * detected, it will retrieve the model class from the configured scope, then provide it to the Action.

- * - * - * - *

Interceptor parameters:

- * - * - * - *
    - * - *
  • className - The model class name. Defaults to the class name of the object returned by the getModel() method.
  • - * - *
  • name - The key to use when storing or retrieving the instance in a scope. Defaults to the model - * class name.
  • - * - *
  • scope - The scope to store and retrieve the model. Defaults to 'request' but can also be 'session'.
  • - *
- * - * - * - *

Extending the interceptor:

- * - * - * - * There are no known extension points for this interceptor. - * - * - * - *

Example code:

- * - *
- * 
- *
- * <-- Basic usage -->
- * <interceptor name="scopedModelDriven" class="com.opensymphony.interceptor.ScopedModelDrivenInterceptor" />
- *
- * <-- Using all available parameters -->
- * <interceptor name="gangsterForm" class="com.opensymphony.interceptor.ScopedModelDrivenInterceptor">
- *      <param name="scope">session</param>
- *      <param name="name">gangsterForm</param>
- *      <param name="className">com.opensymphony.example.GangsterForm</param>
- *  </interceptor>
- *
- * 
- * 
- * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ScopedModelDrivenInterceptor} instead. - */ -@Deprecated -public class ScopedModelDrivenInterceptor extends AbstractInterceptor { - - private static final Class[] EMPTY_CLASS_ARRAY = new Class[0]; - - private static final String GET_MODEL = "getModel"; - private String scope; - private String name; - private String className; - private ObjectFactory objectFactory; - - @Inject - public void setObjectFactory(ObjectFactory factory) { - this.objectFactory = factory; - } - - protected Object resolveModel(ObjectFactory factory, ActionContext actionContext, String modelClassName, String modelScope, String modelName) throws Exception { - Object model; - Map scopeMap = actionContext.getContextMap(); - if ("session".equals(modelScope)) { - scopeMap = actionContext.getSession(); - } - - model = scopeMap.get(modelName); - if (model == null) { - model = factory.buildBean(modelClassName, null); - scopeMap.put(modelName, model); - } - return model; - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - Object action = invocation.getAction(); - - if (action instanceof ScopedModelDriven modelDriven) { - if (modelDriven.getModel() == null) { - ActionContext ctx = ActionContext.getContext(); - ActionConfig config = invocation.getProxy().getConfig(); - - String cName = className; - if (cName == null) { - try { - Method method = action.getClass().getMethod(GET_MODEL, EMPTY_CLASS_ARRAY); - Class cls = method.getReturnType(); - cName = cls.getName(); - } catch (NoSuchMethodException e) { - throw new StrutsException("The " + GET_MODEL + "() is not defined in action " + action.getClass(), config); - } - } - String modelName = name; - if (modelName == null) { - modelName = cName; - } - Object model = resolveModel(objectFactory, ctx, cName, scope, modelName); - modelDriven.setModel(model); - modelDriven.setScopeKey(modelName); - } - } - return invocation.invoke(); - } - - /** - * @param className the className to set - */ - public void setClassName(String className) { - this.className = className; - } - - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @param scope the scope to set - */ - public void setScope(String scope) { - this.scope = scope; - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java deleted file mode 100644 index 371bcc0896..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.Parameterizable; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClearableValueStack; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; -import org.apache.commons.lang3.BooleanUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.StrutsConstants; -import org.apache.struts2.dispatcher.HttpParameters; -import org.apache.struts2.interceptor.ValidationAware; - -import java.util.Collections; -import java.util.Map; - -/** - * - * - * This interceptor populates the action with the static parameters defined in the action configuration. If the action - * implements {@link Parameterizable}, a map of the static parameters will be also be passed directly to the action. - * The static params will be added to the request params map, unless "merge" is set to false. - * - *

Parameters are typically defined with <param> elements within xwork.xml.

- * - * - * - *

Interceptor parameters:

- * - * - * - *
    - * - *
  • None
  • - * - *
- * - * - * - *

Extending the interceptor:

- * - * - * - *

There are no extension points to this interceptor.

- * - * - * - *

Example code:

- * - *
- * 
- * <action name="someAction" class="com.examples.SomeAction">
- *     <interceptor-ref name="staticParams">
- *          <param name="parse">true</param>
- *          <param name="overwrite">false</param>
- *     </interceptor-ref>
- *     <result name="success">good_result.ftl</result>
- * </action>
- * 
- * 
- * - * @author Patrick Lightbody - * - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.StaticParametersInterceptor} instead. - */ -@Deprecated -public class StaticParametersInterceptor extends AbstractInterceptor { - - private boolean parse; - private boolean overwrite; - private boolean merge = true; - private boolean devMode = false; - - private static final Logger LOG = LogManager.getLogger(StaticParametersInterceptor.class); - - private ValueStackFactory valueStackFactory; - private LocalizedTextProvider localizedTextProvider; - - @Inject - public void setValueStackFactory(ValueStackFactory valueStackFactory) { - this.valueStackFactory = valueStackFactory; - } - - @Inject(StrutsConstants.STRUTS_DEVMODE) - public void setDevMode(String mode) { - devMode = BooleanUtils.toBoolean(mode); - } - - @Inject - public void setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) { - this.localizedTextProvider = localizedTextProvider; - } - - public void setParse(String value) { - this.parse = BooleanUtils.toBoolean(value); - } - - public void setMerge(String value) { - this.merge = BooleanUtils.toBoolean(value); - } - - /** - * Overwrites already existing parameters from other sources. - * Static parameters are the successor over previously set parameters, if true. - * - * @param value enable overwrites of already existing parameters from other sources - */ - public void setOverwrite(String value) { - this.overwrite = BooleanUtils.toBoolean(value); - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - ActionConfig config = invocation.getProxy().getConfig(); - Object action = invocation.getAction(); - - final Map parameters = config.getParams(); - - LOG.debug("Setting static parameters: {}", parameters); - - // for actions marked as Parameterizable, pass the static parameters directly - if (action instanceof Parameterizable) { - ((Parameterizable) action).setParams(parameters); - } - - if (parameters != null) { - ActionContext ac = ActionContext.getContext(); - Map contextMap = ac.getContextMap(); - try { - ReflectionContextState.setCreatingNullObjects(contextMap, true); - ReflectionContextState.setReportingConversionErrors(contextMap, true); - final ValueStack stack = ac.getValueStack(); - - ValueStack newStack = valueStackFactory.createValueStack(stack); - boolean clearableStack = newStack instanceof ClearableValueStack; - if (clearableStack) { - //if the stack's context can be cleared, do that to prevent OGNL - //from having access to objects in the stack, see XW-641 - ((ClearableValueStack)newStack).clearContextValues(); - Map context = newStack.getContext(); - ReflectionContextState.setCreatingNullObjects(context, true); - ReflectionContextState.setDenyMethodExecution(context, true); - ReflectionContextState.setReportingConversionErrors(context, true); - - //keep locale from original context - newStack.getActionContext().withLocale(stack.getActionContext().getLocale()); - } - - for (Map.Entry entry : parameters.entrySet()) { - Object val = entry.getValue(); - if (parse && val != null) { - val = TextParseUtil.translateVariables(val.toString(), stack); - } - try { - newStack.setValue(entry.getKey(), val); - } catch (RuntimeException e) { - if (devMode) { - - String developerNotification = localizedTextProvider.findText(StaticParametersInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{ - "Unexpected Exception caught setting '" + entry.getKey() + "' on '" + action.getClass() + ": " + e.getMessage() - }); - LOG.error(developerNotification); - if (action instanceof ValidationAware) { - ((ValidationAware) action).addActionMessage(developerNotification); - } - } - } - } - - if (clearableStack) { - stack.getActionContext().withConversionErrors(newStack.getActionContext().getConversionErrors()); - } - - if (merge) - addParametersToContext(ac, parameters); - } finally { - ReflectionContextState.setCreatingNullObjects(contextMap, false); - ReflectionContextState.setReportingConversionErrors(contextMap, false); - } - } - return invocation.invoke(); - } - - - /** - * @param ac The action context - * @return the parameters from the action mapping in the context. If none found, returns - * an empty map. - */ - protected Map retrieveParameters(ActionContext ac) { - ActionConfig config = ac.getActionInvocation().getProxy().getConfig(); - if (config != null) { - return config.getParams(); - } else { - return Collections.emptyMap(); - } - } - - /** - * Adds the parameters into context's ParameterMap. - * As default, static parameters will not overwrite existing parameters from other sources. - * If you want the static parameters as successor over already existing parameters, set overwrite to true. - * - * @param ac The action context - * @param newParams The parameter map to apply - */ - protected void addParametersToContext(ActionContext ac, Map newParams) { - HttpParameters previousParams = ac.getParameters(); - - HttpParameters.Builder combinedParams; - if (overwrite) { - combinedParams = HttpParameters.create().withParent( previousParams); - combinedParams = combinedParams.withExtraParams(newParams); - } else { - combinedParams = HttpParameters.create(newParams); - combinedParams = combinedParams.withExtraParams(previousParams); - } - ac.withParameters(combinedParams.build()); - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationAware.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationAware.java deleted file mode 100644 index aa9e6f5ff4..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationAware.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ValidationAware} instead. - */ -@Deprecated -public interface ValidationAware extends org.apache.struts2.interceptor.ValidationAware { - - static ValidationAware adapt(org.apache.struts2.interceptor.ValidationAware actualValidation) { - if (actualValidation instanceof ValidationAware) { - return (ValidationAware) actualValidation; - } - return actualValidation != null ? new LegacyAdapter(actualValidation) : null; - } - - class LegacyAdapter implements ValidationAware { - - private final org.apache.struts2.interceptor.ValidationAware adaptee; - - private LegacyAdapter(org.apache.struts2.interceptor.ValidationAware adaptee) { - this.adaptee = adaptee; - } - - @Override - public void setActionErrors(Collection errorMessages) { - adaptee.setActionErrors(errorMessages); - } - - @Override - public Collection getActionErrors() { - return adaptee.getActionErrors(); - } - - @Override - public void setActionMessages(Collection messages) { - adaptee.setActionMessages(messages); - } - - @Override - public Collection getActionMessages() { - return adaptee.getActionMessages(); - } - - @Override - public void setFieldErrors(Map> errorMap) { - adaptee.setFieldErrors(errorMap); - } - - @Override - public Map> getFieldErrors() { - return adaptee.getFieldErrors(); - } - - @Override - public void addActionError(String anErrorMessage) { - adaptee.addActionError(anErrorMessage); - } - - @Override - public void addActionMessage(String aMessage) { - adaptee.addActionMessage(aMessage); - } - - @Override - public void addFieldError(String fieldName, String errorMessage) { - adaptee.addFieldError(fieldName, errorMessage); - } - - @Override - public boolean hasActionErrors() { - return adaptee.hasActionErrors(); - } - - @Override - public boolean hasActionMessages() { - return adaptee.hasActionMessages(); - } - - @Override - public boolean hasFieldErrors() { - return adaptee.hasFieldErrors(); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationErrorAware.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationErrorAware.java deleted file mode 100644 index 184cf13399..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationErrorAware.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ValidationErrorAware} instead. - */ -@Deprecated -public interface ValidationErrorAware extends org.apache.struts2.interceptor.ValidationErrorAware { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationWorkflowAware.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationWorkflowAware.java deleted file mode 100644 index fc0218d43a..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationWorkflowAware.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.interceptor; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.interceptor.ValidationWorkflowAware} instead. - */ -@Deprecated -public interface ValidationWorkflowAware extends org.apache.struts2.interceptor.ValidationWorkflowAware { -} diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ValueStack.java b/core/src/main/java/com/opensymphony/xwork2/util/ValueStack.java deleted file mode 100644 index 22f5bc428b..0000000000 --- a/core/src/main/java/com/opensymphony/xwork2/util/ValueStack.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.opensymphony.xwork2.util; - -import com.opensymphony.xwork2.ActionContext; - -import java.util.Map; - -/** - * @deprecated since 6.7.0, use {@link org.apache.struts2.util.ValueStack} instead. - */ -@Deprecated -public interface ValueStack extends org.apache.struts2.util.ValueStack { - - @Override - ActionContext getActionContext(); - - static ValueStack adapt(org.apache.struts2.util.ValueStack actualStack) { - if (actualStack instanceof ValueStack) { - return (ValueStack) actualStack; - } - return actualStack != null ? new LegacyAdapter(actualStack) : null; - } - - class LegacyAdapter implements ValueStack { - - private final org.apache.struts2.util.ValueStack adaptee; - - private LegacyAdapter(org.apache.struts2.util.ValueStack adaptee) { - this.adaptee = adaptee; - } - - @Override - public Map getContext() { - return adaptee.getContext(); - } - - @Override - public ActionContext getActionContext() { - return ActionContext.adapt(adaptee.getActionContext()); - } - - @Override - public void setDefaultType(Class defaultType) { - adaptee.setDefaultType(defaultType); - } - - @Override - public void setExprOverrides(Map overrides) { - adaptee.setExprOverrides(overrides); - } - - @Override - public Map getExprOverrides() { - return adaptee.getExprOverrides(); - } - - @Override - public CompoundRoot getRoot() { - return adaptee.getRoot(); - } - - @Override - public void setValue(String expr, Object value) { - adaptee.setValue(expr, value); - } - - @Override - public void setParameter(String expr, Object value) { - adaptee.setParameter(expr, value); - } - - @Override - public void setValue(String expr, Object value, boolean throwExceptionOnFailure) { - adaptee.setValue(expr, value, throwExceptionOnFailure); - } - - @Override - public String findString(String expr) { - return adaptee.findString(expr); - } - - @Override - public String findString(String expr, boolean throwExceptionOnFailure) { - return adaptee.findString(expr, throwExceptionOnFailure); - } - - @Override - public Object findValue(String expr) { - return adaptee.findValue(expr); - } - - @Override - public Object findValue(String expr, boolean throwExceptionOnFailure) { - return adaptee.findValue(expr, throwExceptionOnFailure); - } - - @Override - public Object findValue(String expr, Class asType) { - return adaptee.findValue(expr, asType); - } - - @Override - public Object findValue(String expr, Class asType, boolean throwExceptionOnFailure) { - return adaptee.findValue(expr, asType, throwExceptionOnFailure); - } - - @Override - public Object peek() { - return adaptee.peek(); - } - - @Override - public Object pop() { - return adaptee.pop(); - } - - @Override - public void push(Object o) { - adaptee.push(o); - } - - @Override - public void set(String key, Object o) { - adaptee.set(key, o); - } - - @Override - public int size() { - return adaptee.size(); - } - } -} diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java b/core/src/main/java/org/apache/struts2/ActionChainResult.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java rename to core/src/main/java/org/apache/struts2/ActionChainResult.java index 6b6c2813e8..447601b42a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java +++ b/core/src/main/java/org/apache/struts2/ActionChainResult.java @@ -16,13 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.struts2.StrutsException; import java.util.HashSet; import java.util.LinkedList; diff --git a/core/src/main/java/org/apache/struts2/ActionContext.java b/core/src/main/java/org/apache/struts2/ActionContext.java index c17ff43e4d..56163eaccc 100644 --- a/core/src/main/java/org/apache/struts2/ActionContext.java +++ b/core/src/main/java/org/apache/struts2/ActionContext.java @@ -18,14 +18,14 @@ */ package org.apache.struts2; -import com.opensymphony.xwork2.conversion.impl.ConversionData; -import com.opensymphony.xwork2.inject.Container; import jakarta.servlet.ServletContext; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.jsp.PageContext; +import org.apache.struts2.conversion.impl.ConversionData; import org.apache.struts2.dispatcher.HttpParameters; import org.apache.struts2.dispatcher.mapper.ActionMapping; +import org.apache.struts2.inject.Container; import org.apache.struts2.util.ValueStack; import java.io.Serializable; @@ -65,7 +65,7 @@ public class ActionContext implements Serializable { private static final String ACTION_NAME = "org.apache.struts2.ActionContext.name"; /** - * Constant for the {@link ValueStack OGNL value stack}. + * Constant for the {@link org.apache.struts2.util.ValueStack OGNL value stack}. */ private static final String VALUE_STACK = ValueStack.VALUE_STACK; @@ -274,7 +274,7 @@ public ActionContext withLocale(Locale locale) { /** * Gets the Locale of the current action. If no locale was ever specified the platform's - * {@link Locale#getDefault() default locale} is used. + * {@link java.util.Locale#getDefault() default locale} is used. * * @return the Locale of the current action. */ @@ -542,11 +542,10 @@ public ActionContext with(String key, Object value) { } @Override - public boolean equals(Object obj) { - if (!(obj instanceof ActionContext)) { + public final boolean equals(Object obj) { + if (!(obj instanceof ActionContext other)) { return false; } - ActionContext other = (ActionContext) obj; return Objects.equals(getContextMap(), other.getContextMap()); } } diff --git a/core/src/main/java/org/apache/struts2/ActionInvocation.java b/core/src/main/java/org/apache/struts2/ActionInvocation.java index 70599dd3b6..71e2c83307 100644 --- a/core/src/main/java/org/apache/struts2/ActionInvocation.java +++ b/core/src/main/java/org/apache/struts2/ActionInvocation.java @@ -18,7 +18,6 @@ */ package org.apache.struts2; -import com.opensymphony.xwork2.ActionChainResult; import org.apache.struts2.interceptor.PreResultListener; import org.apache.struts2.util.ValueStack; diff --git a/core/src/main/java/org/apache/struts2/ActionProxy.java b/core/src/main/java/org/apache/struts2/ActionProxy.java index d5e19e44da..94b816bf8c 100644 --- a/core/src/main/java/org/apache/struts2/ActionProxy.java +++ b/core/src/main/java/org/apache/struts2/ActionProxy.java @@ -18,7 +18,7 @@ */ package org.apache.struts2; -import com.opensymphony.xwork2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.ActionConfig; /** * ActionProxy is an extra layer between XWork and the action so that different proxies are possible. diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionProxyFactory.java b/core/src/main/java/org/apache/struts2/ActionProxyFactory.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/ActionProxyFactory.java rename to core/src/main/java/org/apache/struts2/ActionProxyFactory.java index 565afd12cf..5cd4eab66e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ActionProxyFactory.java +++ b/core/src/main/java/org/apache/struts2/ActionProxyFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; import java.util.Map; @@ -81,5 +81,5 @@ public interface ActionProxyFactory { */ ActionProxy createActionProxy(ActionInvocation actionInvocation, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext); - + } diff --git a/core/src/main/java/org/apache/struts2/ActionSupport.java b/core/src/main/java/org/apache/struts2/ActionSupport.java index 22d22a66c1..92ce264fe8 100644 --- a/core/src/main/java/org/apache/struts2/ActionSupport.java +++ b/core/src/main/java/org/apache/struts2/ActionSupport.java @@ -18,18 +18,13 @@ */ package org.apache.struts2; -import com.opensymphony.xwork2.LocaleProvider; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.ValidationAwareSupport; -import com.opensymphony.xwork2.conversion.impl.ConversionData; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.conversion.impl.ConversionData; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import org.apache.struts2.interceptor.ValidationAware; +import org.apache.struts2.util.ValueStack; import java.io.Serializable; import java.util.Collection; @@ -166,7 +161,7 @@ public String getFormatted(String key, String expr) { String[] vals = (String[]) conversionErrors.get(expr).getValue(); return vals[0]; } else { - var valueStack = ActionContext.getContext().getValueStack(); + final ValueStack valueStack = ActionContext.getContext().getValueStack(); final Object val = valueStack.findValue(expr); return getText(key, List.of(val)); } diff --git a/core/src/main/java/com/opensymphony/xwork2/AsyncManager.java b/core/src/main/java/org/apache/struts2/AsyncManager.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/AsyncManager.java rename to core/src/main/java/org/apache/struts2/AsyncManager.java index a4dd071611..aa433919a2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/AsyncManager.java +++ b/core/src/main/java/org/apache/struts2/AsyncManager.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; import java.util.concurrent.Callable; diff --git a/core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java b/core/src/main/java/org/apache/struts2/CompositeTextProvider.java similarity index 90% rename from core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java rename to core/src/main/java/org/apache/struts2/CompositeTextProvider.java index 4ab017c111..9790b5a606 100644 --- a/core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java +++ b/core/src/main/java/org/apache/struts2/CompositeTextProvider.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -65,7 +65,7 @@ public CompositeTextProvider(TextProvider[] textProviders) { * @param key The key to lookup in resource bundles. * @return true, if the requested key is found in one of the resource bundles. * - * @see com.opensymphony.xwork2.TextProvider#hasKey(String) + * @see TextProvider#hasKey(String) * */ @Override @@ -85,7 +85,7 @@ public boolean hasKey(String key) { * * @param key The key to lookup in resource bundles. * @return The i18n text for the requested key. - * @see com.opensymphony.xwork2.TextProvider#getText(String) + * @see TextProvider#getText(String) */ @Override public String getText(String key) { @@ -99,7 +99,7 @@ public String getText(String key) { * @param key the message key * @param defaultValue the default value * @return the first valid message for the key or default value - * @see com.opensymphony.xwork2.TextProvider#getText(String, String) + * @see TextProvider#getText(String, String) */ @Override public String getText(String key, String defaultValue) { @@ -115,7 +115,7 @@ public String getText(String key, String defaultValue) { * @param defaultValue the default value * @param obj object * @return the first valid message for the key or default value - * @see com.opensymphony.xwork2.TextProvider#getText(String, String, String) + * @see TextProvider#getText(String, String, String) */ @Override public String getText(String key, String defaultValue, final String obj) { @@ -129,7 +129,7 @@ public String getText(String key, String defaultValue, final String obj) { * @param key the message key * @param args additional arguments * @return the first valid message for the key - * @see com.opensymphony.xwork2.TextProvider#getText(String, java.util.List) + * @see TextProvider#getText(String, java.util.List) */ @Override public String getText(String key, List args) { @@ -143,7 +143,7 @@ public String getText(String key, List args) { * @param key the message key * @param args additional arguments * @return the first valid message for the key or default value - * @see com.opensymphony.xwork2.TextProvider#getText(String, String[]) + * @see TextProvider#getText(String, String[]) */ @Override public String getText(String key, String[] args) { @@ -159,7 +159,7 @@ public String getText(String key, String[] args) { * @param defaultValue the default value * @param args additional arguments * @return the first valid message for the key or default value - * @see com.opensymphony.xwork2.TextProvider#getText(String, String, java.util.List) + * @see TextProvider#getText(String, String, java.util.List) */ @Override public String getText(String key, String defaultValue, List args) { @@ -184,7 +184,7 @@ public String getText(String key, String defaultValue, List args) { * @param defaultValue the default value * @param args additional arguments * @return the first valid message for the key or default value - * @see com.opensymphony.xwork2.TextProvider#getText(String, String, String[]) + * @see TextProvider#getText(String, String, String[]) */ @Override public String getText(String key, String defaultValue, String[] args) { @@ -210,7 +210,7 @@ public String getText(String key, String defaultValue, String[] args) { * @param args additional arguments * @param stack the value stack * @return the first valid message for the key or default value - * @see com.opensymphony.xwork2.TextProvider#getText(String, String, java.util.List, com.opensymphony.xwork2.util.ValueStack) + * @see TextProvider#getText(String, String, java.util.List, org.apache.struts2.util.ValueStack) */ @Override public String getText(String key, String defaultValue, List args, ValueStack stack) { @@ -235,7 +235,7 @@ public String getText(String key, String defaultValue, List args, ValueStack * @param args additional arguments * @param stack the value stack * @return the first valid message for the key or default value - * @see com.opensymphony.xwork2.TextProvider#getText(String, String, String[], com.opensymphony.xwork2.util.ValueStack) + * @see TextProvider#getText(String, String, String[], org.apache.struts2.util.ValueStack) */ @Override public String getText(String key, String defaultValue, String[] args, ValueStack stack) { @@ -273,7 +273,7 @@ public ResourceBundle getTexts(String bundleName) { } /** - * It will consult each {@link com.opensymphony.xwork2.TextProvider}s and return the first non-null {@link ResourceBundle}. + * It will consult each {@link TextProvider}s and return the first non-null {@link ResourceBundle}. * * @return the resource bundle * @see TextProvider#getTexts() diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/core/src/main/java/org/apache/struts2/DefaultActionInvocation.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java rename to core/src/main/java/org/apache/struts2/DefaultActionInvocation.java index 337b2bef2a..079b7e17fa 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java +++ b/core/src/main/java/org/apache/struts2/DefaultActionInvocation.java @@ -16,26 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; - -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.InterceptorMapping; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.ConditionalInterceptor; -import com.opensymphony.xwork2.interceptor.Interceptor; -import com.opensymphony.xwork2.interceptor.PreResultListener; -import com.opensymphony.xwork2.interceptor.WithLazyParams; -import com.opensymphony.xwork2.ognl.OgnlUtil; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; +package org.apache.struts2; + import ognl.MethodFailedException; import ognl.NoSuchPropertyException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.struts2.StrutsException; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.InterceptorMapping; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.ConditionalInterceptor; +import org.apache.struts2.interceptor.Interceptor; +import org.apache.struts2.interceptor.PreResultListener; +import org.apache.struts2.interceptor.WithLazyParams; +import org.apache.struts2.ognl.OgnlUtil; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; import java.util.ArrayList; import java.util.Iterator; @@ -49,7 +48,7 @@ * @author Rainer Hermanns * @author tmjee * @version $Date$ $Id$ - * @see com.opensymphony.xwork2.DefaultActionProxy + * @see DefaultActionProxy */ public class DefaultActionInvocation implements ActionInvocation { @@ -190,7 +189,7 @@ public ValueStack getStack() { } /** - * Register a com.opensymphony.xwork2.interceptor.PreResultListener to be notified after the Action is executed and before the + * Register a org.apache.struts2.interceptor.PreResultListener to be notified after the Action is executed and before the * Result is executed. The ActionInvocation implementation must guarantee that listeners will be called in the order * in which they are registered. Listener registration and execution does not need to be thread-safe. * @@ -258,12 +257,9 @@ public String invoke() throws Exception { Interceptor interceptor = interceptorMapping.getInterceptor(); if (interceptor instanceof WithLazyParams) { interceptor = lazyParamInjector.injectParams(interceptor, interceptorMapping.getParams(), invocationContext); - } else if (interceptor instanceof Interceptor.LegacyAdapter && ((Interceptor.LegacyAdapter) interceptor).getAdaptee() instanceof WithLazyParams) { - org.apache.struts2.interceptor.Interceptor adaptee = ((Interceptor.LegacyAdapter) interceptor).getAdaptee(); - lazyParamInjector.injectParams(adaptee, interceptorMapping.getParams(), invocationContext); } - if (interceptor instanceof ConditionalInterceptor) { - resultCode = executeConditional((ConditionalInterceptor) interceptor); + if (interceptor instanceof ConditionalInterceptor conditionalInterceptor) { + resultCode = executeConditional(conditionalInterceptor); } else { LOG.debug("Executing normal interceptor: {}", interceptorMapping.getName()); resultCode = interceptor.intercept(this); diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java b/core/src/main/java/org/apache/struts2/DefaultActionProxy.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java rename to core/src/main/java/org/apache/struts2/DefaultActionProxy.java index da8a9dbca6..82a5da14be 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java +++ b/core/src/main/java/org/apache/struts2/DefaultActionProxy.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.apache.commons.text.StringEscapeUtils; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java b/core/src/main/java/org/apache/struts2/DefaultActionProxyFactory.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java rename to core/src/main/java/org/apache/struts2/DefaultActionProxyFactory.java index 988c5099b3..c74c5c0b89 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java +++ b/core/src/main/java/org/apache/struts2/DefaultActionProxyFactory.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import java.util.Map; /** - * Default factory for {@link com.opensymphony.xwork2.ActionProxyFactory}. + * Default factory for {@link org.apache.struts2.ActionProxyFactory}. * * @author Jason Carreira */ diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java b/core/src/main/java/org/apache/struts2/DefaultLocaleProvider.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java rename to core/src/main/java/org/apache/struts2/DefaultLocaleProvider.java index 35f16191a8..4e6f8b9fd7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java +++ b/core/src/main/java/org/apache/struts2/DefaultLocaleProvider.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; import org.apache.commons.lang3.LocaleUtils; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProviderFactory.java b/core/src/main/java/org/apache/struts2/DefaultLocaleProviderFactory.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProviderFactory.java rename to core/src/main/java/org/apache/struts2/DefaultLocaleProviderFactory.java index 7d04e010ca..b5f0e5271e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProviderFactory.java +++ b/core/src/main/java/org/apache/struts2/DefaultLocaleProviderFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; public class DefaultLocaleProviderFactory implements LocaleProviderFactory { diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java b/core/src/main/java/org/apache/struts2/DefaultTextProvider.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java rename to core/src/main/java/org/apache/struts2/DefaultTextProvider.java index 6d7315a650..954e2ddae7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java +++ b/core/src/main/java/org/apache/struts2/DefaultTextProvider.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import java.io.Serializable; import java.text.MessageFormat; diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java b/core/src/main/java/org/apache/struts2/DefaultUnknownHandlerManager.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java rename to core/src/main/java/org/apache/struts2/DefaultUnknownHandlerManager.java index 42f4a17cb2..d6d88cb8ac 100644 --- a/core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java +++ b/core/src/main/java/org/apache/struts2/DefaultUnknownHandlerManager.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.UnknownHandlerConfig; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import java.util.ArrayList; import java.util.HashMap; @@ -33,7 +33,7 @@ /** * Default implementation of UnknownHandlerManager * - * @see com.opensymphony.xwork2.UnknownHandlerManager + * @see UnknownHandlerManager */ public class DefaultUnknownHandlerManager implements UnknownHandlerManager { diff --git a/core/src/main/java/com/opensymphony/xwork2/FileManager.java b/core/src/main/java/org/apache/struts2/FileManager.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/FileManager.java rename to core/src/main/java/org/apache/struts2/FileManager.java index 8c70aa90c8..f4d0d7cb1e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/FileManager.java +++ b/core/src/main/java/org/apache/struts2/FileManager.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/opensymphony/xwork2/FileManagerFactory.java b/core/src/main/java/org/apache/struts2/FileManagerFactory.java similarity index 85% rename from core/src/main/java/com/opensymphony/xwork2/FileManagerFactory.java rename to core/src/main/java/org/apache/struts2/FileManagerFactory.java index 5bedeaaca1..7aacd73cce 100644 --- a/core/src/main/java/com/opensymphony/xwork2/FileManagerFactory.java +++ b/core/src/main/java/org/apache/struts2/FileManagerFactory.java @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; + +import org.apache.struts2.util.fs.DefaultFileManager; /** - * Factory that creates FileManager, default to {@link com.opensymphony.xwork2.util.fs.DefaultFileManager} + * Factory that creates FileManager, default to {@link DefaultFileManager} */ public interface FileManagerFactory { diff --git a/core/src/main/java/com/opensymphony/xwork2/LocaleProvider.java b/core/src/main/java/org/apache/struts2/LocaleProvider.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/LocaleProvider.java rename to core/src/main/java/org/apache/struts2/LocaleProvider.java index 00a41a25b3..0b502aa749 100644 --- a/core/src/main/java/com/opensymphony/xwork2/LocaleProvider.java +++ b/core/src/main/java/org/apache/struts2/LocaleProvider.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; import org.apache.commons.lang3.LocaleUtils; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/LocaleProviderFactory.java b/core/src/main/java/org/apache/struts2/LocaleProviderFactory.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/LocaleProviderFactory.java rename to core/src/main/java/org/apache/struts2/LocaleProviderFactory.java index df3363ef33..a2881c36d7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/LocaleProviderFactory.java +++ b/core/src/main/java/org/apache/struts2/LocaleProviderFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; /** * Allows delegate creation of {@link LocaleProvider} to another implementation provided diff --git a/core/src/main/java/com/opensymphony/xwork2/LocalizedTextProvider.java b/core/src/main/java/org/apache/struts2/LocalizedTextProvider.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/LocalizedTextProvider.java rename to core/src/main/java/org/apache/struts2/LocalizedTextProvider.java index 0992ec7bd7..967a6d4781 100644 --- a/core/src/main/java/com/opensymphony/xwork2/LocalizedTextProvider.java +++ b/core/src/main/java/org/apache/struts2/LocalizedTextProvider.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import java.io.Serializable; import java.util.Locale; diff --git a/core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java b/core/src/main/java/org/apache/struts2/ObjectFactory.java similarity index 87% rename from core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java rename to core/src/main/java/org/apache/struts2/ObjectFactory.java index 3a5c8f2660..32e273c87c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java +++ b/core/src/main/java/org/apache/struts2/ObjectFactory.java @@ -16,32 +16,36 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.InterceptorConfig; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.factory.*; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.Interceptor; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.validator.Validator; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.InterceptorConfig; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.Interceptor; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.validator.Validator; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.struts2.StrutsConstants; +import org.apache.struts2.factory.ActionFactory; +import org.apache.struts2.factory.ConverterFactory; +import org.apache.struts2.factory.InterceptorFactory; +import org.apache.struts2.factory.ResultFactory; +import org.apache.struts2.factory.UnknownHandlerFactory; +import org.apache.struts2.factory.ValidatorFactory; import java.io.Serializable; import java.util.Map; /** - * ObjectFactory is responsible for building the core framework objects. Users may register their + * ObjectFactory is responsible for building the core framework objects. Users may register their * own implementation of the ObjectFactory to control instantiation of these Objects. * *

- * This default implementation uses the {@link #buildBean(Class,java.util.Map) buildBean} + * This default implementation uses the {@link #buildBean(Class,java.util.Map) buildBean} * method to create all classes (interceptors, actions, results, etc). *

* @@ -135,7 +139,7 @@ public Class getClassInstance(String className) throws ClassNotFoundException { * @param actionName the name the action configuration is set up with in the configuration * @param namespace the namespace the action is configured in * @param config the action configuration found in the config for the actionName / namespace - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * @return instance of the action class to handle a web request * @throws Exception in case of any error */ @@ -147,7 +151,7 @@ public Object buildAction(String actionName, String namespace, ActionConfig conf * Build a generic Java object of the given type. * * @param clazz the type of Object to build - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * @return object for the given type * @throws Exception in case of any error */ @@ -171,19 +175,19 @@ protected Object injectInternalBeans(Object obj) { * Build a generic Java object of the given type. * * @param className the type of Object to build - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * @return object for the given type * @throws Exception in case of any error */ public Object buildBean(String className, Map extraContext) throws Exception { return buildBean(className, extraContext, true); } - + /** * Build a generic Java object of the given type. * * @param className the type of Object to build - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * @param injectInternal true if inject internal beans * @return object for the given type * @throws Exception in case of any error @@ -214,7 +218,7 @@ public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map extraCo * * @param className the type of Validator to build * @param params property name -> value Map to set onto the Validator instance - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * * @return validator of the given type * @throws Exception in case of any error @@ -241,7 +245,7 @@ public Validator buildValidator(String className, Map params, Ma * Build converter of given type * * @param converterClass to instantiate - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * @return instance of converterClass with inject dependencies * @throws Exception in case of any error */ @@ -260,5 +264,5 @@ public TypeConverter buildConverter(Class converterClas public UnknownHandler buildUnknownHandler(String unknownHandlerName, Map extraContext) throws Exception { return unknownHandlerFactory.buildUnknownHandler(unknownHandlerName, extraContext); } - + } diff --git a/core/src/main/java/org/apache/struts2/Preparable.java b/core/src/main/java/org/apache/struts2/Preparable.java index 70b0f464dd..434c972c34 100644 --- a/core/src/main/java/org/apache/struts2/Preparable.java +++ b/core/src/main/java/org/apache/struts2/Preparable.java @@ -19,11 +19,11 @@ package org.apache.struts2; /** - * Preparable Actions will have their prepare() method called if the {@link com.opensymphony.xwork2.interceptor.PrepareInterceptor} - * is applied to the ActionConfig. + * Preparable Actions will have their prepare() method called if the + * {@link org.apache.struts2.interceptor.PrepareInterceptor} is applied to the ActionConfig. * * @author Jason Carreira - * @see com.opensymphony.xwork2.interceptor.PrepareInterceptor + * @see org.apache.struts2.interceptor.PrepareInterceptor */ public interface Preparable { diff --git a/core/src/main/java/com/opensymphony/xwork2/ResourceBundleTextProvider.java b/core/src/main/java/org/apache/struts2/ResourceBundleTextProvider.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/ResourceBundleTextProvider.java rename to core/src/main/java/org/apache/struts2/ResourceBundleTextProvider.java index 97a783fe2b..b2ee3cad77 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ResourceBundleTextProvider.java +++ b/core/src/main/java/org/apache/struts2/ResourceBundleTextProvider.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; import java.util.ResourceBundle; diff --git a/core/src/main/java/org/apache/struts2/ServletActionContext.java b/core/src/main/java/org/apache/struts2/ServletActionContext.java index e6038e302a..9efccfce50 100644 --- a/core/src/main/java/org/apache/struts2/ServletActionContext.java +++ b/core/src/main/java/org/apache/struts2/ServletActionContext.java @@ -18,8 +18,8 @@ */ package org.apache.struts2; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.ServletContext; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java index 1f5b379290..85064e702f 100644 --- a/core/src/main/java/org/apache/struts2/StrutsConstants.java +++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java @@ -19,6 +19,7 @@ package org.apache.struts2; import org.apache.struts2.components.date.DateFormatter; +import org.apache.struts2.conversion.impl.XWorkBasicConverter; import org.apache.struts2.dispatcher.mapper.CompositeActionMapper; /** @@ -73,7 +74,7 @@ public final class StrutsConstants { public static final String STRUTS_URL_RENDERER = "struts.urlRenderer"; - /** The com.opensymphony.xwork2.ObjectFactory implementation class */ + /** The org.apache.struts2.ObjectFactory implementation class */ public static final String STRUTS_OBJECTFACTORY = "struts.objectFactory"; public static final String STRUTS_OBJECTFACTORY_ACTIONFACTORY = "struts.objectFactory.actionFactory"; public static final String STRUTS_OBJECTFACTORY_RESULTFACTORY = "struts.objectFactory.resultFactory"; @@ -82,13 +83,13 @@ public final class StrutsConstants { public static final String STRUTS_OBJECTFACTORY_VALIDATORFACTORY = "struts.objectFactory.validatorFactory"; public static final String STRUTS_OBJECTFACTORY_UNKNOWNHANDLERFACTORY = "struts.objectFactory.unknownHandlerFactory"; - /** The com.opensymphony.xwork2.util.FileManager implementation class */ + /** The org.apache.struts2.util.FileManager implementation class */ public static final String STRUTS_FILE_MANAGER_FACTORY = "struts.fileManagerFactory"; - /** The com.opensymphony.xwork2.util.fs.FileManager implementation class */ + /** The org.apache.struts2.util.fs.FileManager implementation class */ public static final String STRUTS_FILE_MANAGER = "struts.fileManager"; - /** The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class */ + /** The org.apache.struts2.util.ObjectTypeDeterminer implementation class */ public static final String STRUTS_OBJECTTYPEDETERMINER = "struts.objectTypeDeterminer"; /** The package containing actions that use Rife continuations */ @@ -240,7 +241,7 @@ public final class StrutsConstants { /** Fallback to empty namespace when request namespace didn't match any in action configuration */ public static final String STRUTS_ACTION_CONFIG_FALLBACK_TO_EMPTY_NAMESPACE = "struts.actionConfig.fallbackToEmptyNamespace"; - /** The {@link com.opensymphony.xwork2.LocaleProviderFactory} implementation class */ + /** The {@link org.apache.struts2.LocaleProviderFactory} implementation class */ public static final String STRUTS_LOCALE_PROVIDER_FACTORY = "struts.localeProviderFactory"; /** The name of the parameter to create when mapping an id (used by some action mappers) */ @@ -255,25 +256,25 @@ public final class StrutsConstants { public static final String STRUTS_OGNL_GUARD = "struts.ognlGuard"; - /** The com.opensymphony.xwork2.validator.ActionValidatorManager implementation class */ + /** The org.apache.struts2.validator.ActionValidatorManager implementation class */ public static final String STRUTS_ACTIONVALIDATORMANAGER = "struts.actionValidatorManager"; - /** The {@link com.opensymphony.xwork2.util.ValueStackFactory} implementation class */ + /** The {@link org.apache.struts2.util.ValueStackFactory} implementation class */ public static final String STRUTS_VALUESTACKFACTORY = "struts.valueStackFactory"; - /** The {@link com.opensymphony.xwork2.util.reflection.ReflectionProvider} implementation class */ + /** The {@link org.apache.struts2.util.reflection.ReflectionProvider} implementation class */ public static final String STRUTS_REFLECTIONPROVIDER = "struts.reflectionProvider"; - /** The {@link com.opensymphony.xwork2.util.reflection.ReflectionContextFactory} implementation class */ + /** The {@link org.apache.struts2.util.reflection.ReflectionContextFactory} implementation class */ public static final String STRUTS_REFLECTIONCONTEXTFACTORY = "struts.reflectionContextFactory"; - /** The {@link com.opensymphony.xwork2.util.PatternMatcher} implementation class */ + /** The {@link org.apache.struts2.util.PatternMatcher} implementation class */ public static final String STRUTS_PATTERNMATCHER = "struts.patternMatcher"; /** The {@link org.apache.struts2.dispatcher.StaticContentLoader} implementation class */ public static final String STRUTS_STATIC_CONTENT_LOADER = "struts.staticContentLoader"; - /** The {@link com.opensymphony.xwork2.UnknownHandlerManager} implementation class */ + /** The {@link org.apache.struts2.UnknownHandlerManager} implementation class */ public static final String STRUTS_UNKNOWN_HANDLER_MANAGER = "struts.unknownHandlerManager"; /** Throw RuntimeException when a property is not found, or the evaluation of the expression fails */ @@ -332,7 +333,7 @@ public final class StrutsConstants { /** * Specifies the type of cache to use for parsed OGNL expressions. Valid values defined in - * {@link com.opensymphony.xwork2.ognl.OgnlCacheFactory.CacheType}. + * {@link org.apache.struts2.ognl.OgnlCacheFactory.CacheType}. *
    *
  • For the W-TinyLfu cache, the eviction policy is detailed * here.
  • @@ -370,7 +371,7 @@ public final class StrutsConstants { /** The{@link org.apache.struts2.views.util.UrlHelper} implementation class */ public static final String STRUTS_URL_HELPER = "struts.view.urlHelper"; - /** {@link com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter} */ + /** {@link XWorkBasicConverter} */ public static final String STRUTS_CONVERTER_COLLECTION = "struts.converter.collection"; public static final String STRUTS_CONVERTER_ARRAY = "struts.converter.array"; public static final String STRUTS_CONVERTER_DATE = "struts.converter.date"; @@ -462,7 +463,7 @@ public final class StrutsConstants { public static final String STRUTS_OGNL_AUTO_GROWTH_COLLECTION_LIMIT = "struts.ognl.autoGrowthCollectionLimit"; - /** See {@link com.opensymphony.xwork2.config.impl.AbstractMatcher#appendNamedParameters */ + /** See {@link org.apache.struts2.config.impl.AbstractMatcher#appendNamedParameters */ public static final String STRUTS_MATCHER_APPEND_NAMED_PARAMETERS = "struts.matcher.appendNamedParameters"; public static final String STRUTS_CHAINING_COPY_ERRORS = "struts.chaining.copyErrors"; diff --git a/core/src/main/java/org/apache/struts2/StrutsException.java b/core/src/main/java/org/apache/struts2/StrutsException.java index 9a7faa82b2..aad0223828 100644 --- a/core/src/main/java/org/apache/struts2/StrutsException.java +++ b/core/src/main/java/org/apache/struts2/StrutsException.java @@ -18,9 +18,9 @@ */ package org.apache.struts2; -import com.opensymphony.xwork2.util.location.Locatable; -import com.opensymphony.xwork2.util.location.Location; -import com.opensymphony.xwork2.util.location.LocationUtils; +import org.apache.struts2.util.location.Locatable; +import org.apache.struts2.util.location.Location; +import org.apache.struts2.util.location.LocationUtils; /** * A generic runtime exception that optionally contains Location information diff --git a/core/src/main/java/org/apache/struts2/StrutsStatics.java b/core/src/main/java/org/apache/struts2/StrutsStatics.java index 478bea734c..6ff9322261 100644 --- a/core/src/main/java/org/apache/struts2/StrutsStatics.java +++ b/core/src/main/java/org/apache/struts2/StrutsStatics.java @@ -31,27 +31,27 @@ public interface StrutsStatics { /** * Constant for the HTTP request object. */ - String HTTP_REQUEST = "com.opensymphony.xwork2.dispatcher.HttpServletRequest"; + String HTTP_REQUEST = "org.apache.struts2.dispatcher.HttpServletRequest"; /** * Constant for the HTTP response object. */ - String HTTP_RESPONSE = "com.opensymphony.xwork2.dispatcher.HttpServletResponse"; + String HTTP_RESPONSE = "org.apache.struts2.dispatcher.HttpServletResponse"; /** * Constant for an HTTP {@link jakarta.servlet.RequestDispatcher request dispatcher}. */ - String SERVLET_DISPATCHER = "com.opensymphony.xwork2.dispatcher.ServletDispatcher"; + String SERVLET_DISPATCHER = "org.apache.struts2.dispatcher.ServletDispatcher"; /** * Constant for the {@link jakarta.servlet.ServletContext servlet context} object. */ - String SERVLET_CONTEXT = "com.opensymphony.xwork2.dispatcher.ServletContext"; + String SERVLET_CONTEXT = "org.apache.struts2.dispatcher.ServletContext"; /** * Constant for the JSP {@link jakarta.servlet.jsp.PageContext page context}. */ - String PAGE_CONTEXT = "com.opensymphony.xwork2.dispatcher.PageContext"; + String PAGE_CONTEXT = "org.apache.struts2.dispatcher.PageContext"; /** * Set as an attribute in the request to let other parts of the framework know that the invocation is happening inside an diff --git a/core/src/main/java/com/opensymphony/xwork2/StrutsTextProviderFactory.java b/core/src/main/java/org/apache/struts2/StrutsTextProviderFactory.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/StrutsTextProviderFactory.java rename to core/src/main/java/org/apache/struts2/StrutsTextProviderFactory.java index 5961d01e38..06a4617a04 100644 --- a/core/src/main/java/com/opensymphony/xwork2/StrutsTextProviderFactory.java +++ b/core/src/main/java/org/apache/struts2/StrutsTextProviderFactory.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import java.util.ResourceBundle; diff --git a/core/src/main/java/com/opensymphony/xwork2/TextProvider.java b/core/src/main/java/org/apache/struts2/TextProvider.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/TextProvider.java rename to core/src/main/java/org/apache/struts2/TextProvider.java index 9ac7163c23..16924a7577 100644 --- a/core/src/main/java/com/opensymphony/xwork2/TextProvider.java +++ b/core/src/main/java/org/apache/struts2/TextProvider.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import java.util.List; import java.util.ResourceBundle; @@ -41,7 +41,7 @@ *

    * When you want to use your own implementation for Struts 2 project you have to define following * bean and constant in struts.xml: - * <bean class="org.demo.MyTextProvider" name="myTextProvider" type="com.opensymphony.xwork2.TextProvider" /> + * <bean class="org.demo.MyTextProvider" name="myTextProvider" type="org.apache.struts.TextProvider" /> * <constant name="struts.textProvider" value="myTextProvider" /> *

    * @@ -52,7 +52,7 @@ *

    * *

    - * Take a look on {@link com.opensymphony.xwork2.ActionSupport} for example TextProvider implementation. + * Take a look on {@link org.apache.struts2.ActionSupport} for example TextProvider implementation. *

    * @author Jason Carreira * @author Rainer Hermanns diff --git a/core/src/main/java/com/opensymphony/xwork2/TextProviderFactory.java b/core/src/main/java/org/apache/struts2/TextProviderFactory.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/TextProviderFactory.java rename to core/src/main/java/org/apache/struts2/TextProviderFactory.java index bad064178e..b7c5a1f5d3 100644 --- a/core/src/main/java/com/opensymphony/xwork2/TextProviderFactory.java +++ b/core/src/main/java/org/apache/struts2/TextProviderFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; import java.util.ResourceBundle; diff --git a/core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java b/core/src/main/java/org/apache/struts2/TextProviderSupport.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java rename to core/src/main/java/org/apache/struts2/TextProviderSupport.java index 7f8afbc9a4..cee8b86011 100644 --- a/core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java +++ b/core/src/main/java/org/apache/struts2/TextProviderSupport.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import java.util.*; diff --git a/core/src/main/java/org/apache/struts2/Unchainable.java b/core/src/main/java/org/apache/struts2/Unchainable.java index 02e0101422..5ff75b0d99 100644 --- a/core/src/main/java/org/apache/struts2/Unchainable.java +++ b/core/src/main/java/org/apache/struts2/Unchainable.java @@ -21,7 +21,7 @@ /** * Simple marker interface to indicate an object should not have its properties copied during chaining. * - * @see com.opensymphony.xwork2.interceptor.ChainingInterceptor + * @see org.apache.struts2.interceptor.ChainingInterceptor */ public interface Unchainable { } diff --git a/core/src/main/java/com/opensymphony/xwork2/UnknownHandler.java b/core/src/main/java/org/apache/struts2/UnknownHandler.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/UnknownHandler.java rename to core/src/main/java/org/apache/struts2/UnknownHandler.java index 5ae380225f..a763a01b6c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/UnknownHandler.java +++ b/core/src/main/java/org/apache/struts2/UnknownHandler.java @@ -16,10 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import org.apache.struts2.StrutsException; +import org.apache.struts2.config.entities.ActionConfig; /** * Handles cases when the result or action is unknown. @@ -29,21 +28,21 @@ *

    */ public interface UnknownHandler { - + /** * Handles the case when an action configuration is unknown. Implementations can return a new ActionConfig * to be used to process the request. - * + * * @param namespace The namespace * @param actionName The action name * @return An generated ActionConfig, can return null * @throws StrutsException in case of errors */ ActionConfig handleUnknownAction(String namespace, String actionName) throws StrutsException; - + /** - * Handles the case when a result cannot be found for an action and result code. - * + * Handles the case when a result cannot be found for an action and result code. + * * @param actionContext The action context * @param actionName The action name * @param actionConfig The action config @@ -52,10 +51,10 @@ public interface UnknownHandler { * @throws StrutsException in case of errors */ Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode) throws StrutsException; - + /** * Handles the case when an action method cannot be found. This method is responsible both for finding the method and executing it. - * + * * @since 2.1 * @param action The action object * @param methodName The method name to call diff --git a/core/src/main/java/com/opensymphony/xwork2/UnknownHandlerManager.java b/core/src/main/java/org/apache/struts2/UnknownHandlerManager.java similarity index 91% rename from core/src/main/java/com/opensymphony/xwork2/UnknownHandlerManager.java rename to core/src/main/java/org/apache/struts2/UnknownHandlerManager.java index 3e8246232c..8c7a330618 100644 --- a/core/src/main/java/com/opensymphony/xwork2/UnknownHandlerManager.java +++ b/core/src/main/java/org/apache/struts2/UnknownHandlerManager.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.ActionConfig; import java.util.List; /** * An unknown handler manager contains a list of UnknownHandler and iterates on them by order * - * @see com.opensymphony.xwork2.DefaultUnknownHandlerManager + * @see org.apache.struts2.DefaultUnknownHandlerManager */ public interface UnknownHandlerManager { diff --git a/core/src/main/java/org/apache/struts2/Validateable.java b/core/src/main/java/org/apache/struts2/Validateable.java index d563e7905d..16f52670ab 100644 --- a/core/src/main/java/org/apache/struts2/Validateable.java +++ b/core/src/main/java/org/apache/struts2/Validateable.java @@ -22,8 +22,8 @@ * Provides an interface in which a call for a validation check can be done. * * @author Jason Carreira - * @see com.opensymphony.xwork2.ActionSupport - * @see com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor + * @see ActionSupport + * @see org.apache.struts2.interceptor.DefaultWorkflowInterceptor */ public interface Validateable { diff --git a/core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java b/core/src/main/java/org/apache/struts2/ValidationAwareSupport.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java rename to core/src/main/java/org/apache/struts2/ValidationAwareSupport.java index 385911c612..d014189399 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java +++ b/core/src/main/java/org/apache/struts2/ValidationAwareSupport.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.interceptor.ValidationAware; +import org.apache.struts2.interceptor.ValidationAware; import java.io.Serializable; import java.util.ArrayList; diff --git a/core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java b/core/src/main/java/org/apache/struts2/XWorkJUnit4TestCase.java similarity index 80% rename from core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java rename to core/src/main/java/org/apache/struts2/XWorkJUnit4TestCase.java index fe39c0c2a8..96afc8a4e1 100644 --- a/core/src/main/java/com/opensymphony/xwork2/XWorkJUnit4TestCase.java +++ b/core/src/main/java/org/apache/struts2/XWorkJUnit4TestCase.java @@ -16,20 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; +package org.apache.struts2; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Context; -import com.opensymphony.xwork2.inject.Factory; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.test.StubConfigurationProvider; -import com.opensymphony.xwork2.util.XWorkTestCaseHelper; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Context; +import org.apache.struts2.inject.Factory; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.test.StubConfigurationProvider; +import org.apache.struts2.util.XWorkTestCaseHelper; +import org.apache.struts2.util.location.LocatableProperties; import org.junit.After; import org.junit.Before; diff --git a/core/src/main/java/com/opensymphony/xwork2/XWorkTestCase.java b/core/src/main/java/org/apache/struts2/XWorkTestCase.java similarity index 87% rename from core/src/main/java/com/opensymphony/xwork2/XWorkTestCase.java rename to core/src/main/java/org/apache/struts2/XWorkTestCase.java index 56056703ef..fa31ea77b5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/XWorkTestCase.java +++ b/core/src/main/java/org/apache/struts2/XWorkTestCase.java @@ -16,20 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2; - -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Context; -import com.opensymphony.xwork2.inject.Factory; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.test.StubConfigurationProvider; -import com.opensymphony.xwork2.util.XWorkTestCaseHelper; -import com.opensymphony.xwork2.util.location.LocatableProperties; +package org.apache.struts2; + +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Context; +import org.apache.struts2.inject.Factory; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.test.StubConfigurationProvider; +import org.apache.struts2.util.XWorkTestCaseHelper; +import org.apache.struts2.util.location.LocatableProperties; import junit.framework.TestCase; import org.apache.commons.lang3.ClassUtils; diff --git a/core/src/main/java/org/apache/struts2/action/CspReportAction.java b/core/src/main/java/org/apache/struts2/action/CspReportAction.java index b4fee3937c..c8b6b7bc51 100644 --- a/core/src/main/java/org/apache/struts2/action/CspReportAction.java +++ b/core/src/main/java/org/apache/struts2/action/CspReportAction.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.action; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/components/ActionComponent.java b/core/src/main/java/org/apache/struts2/components/ActionComponent.java index 1a517f241a..b1260cc8b7 100644 --- a/core/src/main/java/org/apache/struts2/components/ActionComponent.java +++ b/core/src/main/java/org/apache/struts2/components/ActionComponent.java @@ -18,13 +18,13 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.ActionProxyFactory; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.ActionProxyFactory; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.jsp.PageContext; diff --git a/core/src/main/java/org/apache/struts2/components/ActionError.java b/core/src/main/java/org/apache/struts2/components/ActionError.java index aadb40fc81..d006aa34ba 100644 --- a/core/src/main/java/org/apache/struts2/components/ActionError.java +++ b/core/src/main/java/org/apache/struts2/components/ActionError.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/ActionMessage.java b/core/src/main/java/org/apache/struts2/components/ActionMessage.java index 46ad4ef16c..8c68f5ba62 100644 --- a/core/src/main/java/org/apache/struts2/components/ActionMessage.java +++ b/core/src/main/java/org/apache/struts2/components/ActionMessage.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/Anchor.java b/core/src/main/java/org/apache/struts2/components/Anchor.java index f3af5aaa67..6bda43f209 100644 --- a/core/src/main/java/org/apache/struts2/components/Anchor.java +++ b/core/src/main/java/org/apache/struts2/components/Anchor.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/org/apache/struts2/components/AppendIterator.java b/core/src/main/java/org/apache/struts2/components/AppendIterator.java index b5c6c448d0..b57d274095 100644 --- a/core/src/main/java/org/apache/struts2/components/AppendIterator.java +++ b/core/src/main/java/org/apache/struts2/components/AppendIterator.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.components.Param.UnnamedParametric; diff --git a/core/src/main/java/org/apache/struts2/components/Bean.java b/core/src/main/java/org/apache/struts2/components/Bean.java index e8dc3b0a7a..db39cb16f5 100644 --- a/core/src/main/java/org/apache/struts2/components/Bean.java +++ b/core/src/main/java/org/apache/struts2/components/Bean.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.util.reflection.ReflectionProvider; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/Checkbox.java b/core/src/main/java/org/apache/struts2/components/Checkbox.java index 6c6160b9be..87c400d018 100644 --- a/core/src/main/java/org/apache/struts2/components/Checkbox.java +++ b/core/src/main/java/org/apache/struts2/components/Checkbox.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.StrutsConstants; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/CheckboxList.java b/core/src/main/java/org/apache/struts2/components/CheckboxList.java index fe9a2436c3..acf8b44053 100644 --- a/core/src/main/java/org/apache/struts2/components/CheckboxList.java +++ b/core/src/main/java/org/apache/struts2/components/CheckboxList.java @@ -23,7 +23,7 @@ import org.apache.struts2.views.annotations.StrutsTag; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * diff --git a/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java b/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java index db7230bdda..89d6444c25 100644 --- a/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/ClosingUIBean.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/ComboBox.java b/core/src/main/java/org/apache/struts2/components/ComboBox.java index 4f288fd93e..2ae6dfd34a 100644 --- a/core/src/main/java/org/apache/struts2/components/ComboBox.java +++ b/core/src/main/java/org/apache/struts2/components/ComboBox.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.util.MakeIterator; diff --git a/core/src/main/java/org/apache/struts2/components/Component.java b/core/src/main/java/org/apache/struts2/components/Component.java index f61d07fd4d..c9cd1bd675 100644 --- a/core/src/main/java/org/apache/struts2/components/Component.java +++ b/core/src/main/java/org/apache/struts2/components/Component.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.security.NotExcludedAcceptedPatternsChecker; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.security.NotExcludedAcceptedPatternsChecker; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.MethodUtils; diff --git a/core/src/main/java/org/apache/struts2/components/ComponentUrlProvider.java b/core/src/main/java/org/apache/struts2/components/ComponentUrlProvider.java index a2f55c51df..492e7170c0 100644 --- a/core/src/main/java/org/apache/struts2/components/ComponentUrlProvider.java +++ b/core/src/main/java/org/apache/struts2/components/ComponentUrlProvider.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/components/ContextBean.java b/core/src/main/java/org/apache/struts2/components/ContextBean.java index 69f393a465..5d78d6d8ba 100644 --- a/core/src/main/java/org/apache/struts2/components/ContextBean.java +++ b/core/src/main/java/org/apache/struts2/components/ContextBean.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.views.annotations.StrutsTagAttribute; @@ -27,7 +27,7 @@ */ public abstract class ContextBean extends Component { protected String var; - + public ContextBean(ValueStack stack) { super(stack); } @@ -37,14 +37,14 @@ protected void putInContext(Object value) { stack.getContext().put(var, value); } } - + @StrutsTagAttribute(description="Name used to reference the value pushed into the Value Stack (scope: action).") public void setVar(String var) { if (var != null) { this.var = findString(var); } } - + protected String getVar() { return this.var; } diff --git a/core/src/main/java/org/apache/struts2/components/Date.java b/core/src/main/java/org/apache/struts2/components/Date.java index 2cded8f389..08d84ab778 100644 --- a/core/src/main/java/org/apache/struts2/components/Date.java +++ b/core/src/main/java/org/apache/struts2/components/Date.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.TextProvider; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.components.date.DateFormatter; diff --git a/core/src/main/java/org/apache/struts2/components/DateTextField.java b/core/src/main/java/org/apache/struts2/components/DateTextField.java index 76fb955154..314e376383 100644 --- a/core/src/main/java/org/apache/struts2/components/DateTextField.java +++ b/core/src/main/java/org/apache/struts2/components/DateTextField.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.views.annotations.StrutsTag; diff --git a/core/src/main/java/org/apache/struts2/components/Debug.java b/core/src/main/java/org/apache/struts2/components/Debug.java index 634b88f860..ddd228bf24 100644 --- a/core/src/main/java/org/apache/struts2/components/Debug.java +++ b/core/src/main/java/org/apache/struts2/components/Debug.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.reflection.ReflectionProvider; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java index 3c2e461a40..56a1de8a7f 100644 --- a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTagAttribute; import jakarta.servlet.http.HttpServletRequest; diff --git a/core/src/main/java/org/apache/struts2/components/DoubleSelect.java b/core/src/main/java/org/apache/struts2/components/DoubleSelect.java index c1adfcc1c5..2cb5ecf96a 100644 --- a/core/src/main/java/org/apache/struts2/components/DoubleSelect.java +++ b/core/src/main/java/org/apache/struts2/components/DoubleSelect.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.views.annotations.StrutsTag; diff --git a/core/src/main/java/org/apache/struts2/components/Else.java b/core/src/main/java/org/apache/struts2/components/Else.java index 6b697152ba..9f00a3a700 100644 --- a/core/src/main/java/org/apache/struts2/components/Else.java +++ b/core/src/main/java/org/apache/struts2/components/Else.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import java.io.Writer; diff --git a/core/src/main/java/org/apache/struts2/components/ElseIf.java b/core/src/main/java/org/apache/struts2/components/ElseIf.java index 30f4a991c7..f98914c568 100644 --- a/core/src/main/java/org/apache/struts2/components/ElseIf.java +++ b/core/src/main/java/org/apache/struts2/components/ElseIf.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/FieldError.java b/core/src/main/java/org/apache/struts2/components/FieldError.java index c044bfddb8..65a742026c 100644 --- a/core/src/main/java/org/apache/struts2/components/FieldError.java +++ b/core/src/main/java/org/apache/struts2/components/FieldError.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.components.Param.UnnamedParametric; diff --git a/core/src/main/java/org/apache/struts2/components/File.java b/core/src/main/java/org/apache/struts2/components/File.java index 9c754b8492..e9317afba4 100644 --- a/core/src/main/java/org/apache/struts2/components/File.java +++ b/core/src/main/java/org/apache/struts2/components/File.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; 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 52c9870382..7db1477c32 100644 --- a/core/src/main/java/org/apache/struts2/components/Form.java +++ b/core/src/main/java/org/apache/struts2/components/Form.java @@ -18,21 +18,21 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.RuntimeConfiguration; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.InterceptorMapping; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.MethodFilterInterceptorUtil; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.validator.ActionValidatorManager; -import com.opensymphony.xwork2.validator.FieldValidator; -import com.opensymphony.xwork2.validator.ValidationException; -import com.opensymphony.xwork2.validator.ValidationInterceptor; -import com.opensymphony.xwork2.validator.Validator; -import com.opensymphony.xwork2.validator.ValidatorContext; -import com.opensymphony.xwork2.validator.validators.VisitorFieldValidator; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.RuntimeConfiguration; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.InterceptorMapping; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.MethodFilterInterceptorUtil; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.validator.ActionValidatorManager; +import org.apache.struts2.validator.FieldValidator; +import org.apache.struts2.validator.ValidationException; +import org.apache.struts2.validator.ValidationInterceptor; +import org.apache.struts2.validator.Validator; +import org.apache.struts2.validator.ValidatorContext; +import org.apache.struts2.validator.validators.VisitorFieldValidator; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/org/apache/struts2/components/FormButton.java b/core/src/main/java/org/apache/struts2/components/FormButton.java index 268c39e294..d46828db51 100644 --- a/core/src/main/java/org/apache/struts2/components/FormButton.java +++ b/core/src/main/java/org/apache/struts2/components/FormButton.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.dispatcher.mapper.ActionMapping; diff --git a/core/src/main/java/org/apache/struts2/components/GenericUIBean.java b/core/src/main/java/org/apache/struts2/components/GenericUIBean.java index 942d122a29..07f2f8c03e 100644 --- a/core/src/main/java/org/apache/struts2/components/GenericUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/GenericUIBean.java @@ -24,7 +24,7 @@ import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.util.ContainUtil; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * diff --git a/core/src/main/java/org/apache/struts2/components/Head.java b/core/src/main/java/org/apache/struts2/components/Head.java index 1bd28a9b1b..bd89baee63 100644 --- a/core/src/main/java/org/apache/struts2/components/Head.java +++ b/core/src/main/java/org/apache/struts2/components/Head.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.StrutsConstants; import org.apache.struts2.views.annotations.StrutsTag; diff --git a/core/src/main/java/org/apache/struts2/components/Hidden.java b/core/src/main/java/org/apache/struts2/components/Hidden.java index 205ad0cdf6..b8c16237e7 100644 --- a/core/src/main/java/org/apache/struts2/components/Hidden.java +++ b/core/src/main/java/org/apache/struts2/components/Hidden.java @@ -23,7 +23,7 @@ import org.apache.struts2.views.annotations.StrutsTag; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * diff --git a/core/src/main/java/org/apache/struts2/components/I18n.java b/core/src/main/java/org/apache/struts2/components/I18n.java index 49565fcbd7..44ff427df2 100644 --- a/core/src/main/java/org/apache/struts2/components/I18n.java +++ b/core/src/main/java/org/apache/struts2/components/I18n.java @@ -21,18 +21,17 @@ import java.io.Writer; import java.util.ResourceBundle; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.TextProviderFactory; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.LocalizedTextProvider; +import org.apache.struts2.TextProviderFactory; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; import org.apache.struts2.StrutsException; -import com.opensymphony.xwork2.LocaleProvider; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.LocaleProvider; +import org.apache.struts2.TextProvider; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/components/If.java b/core/src/main/java/org/apache/struts2/components/If.java index 1ff0fc8f10..19ecf528ae 100644 --- a/core/src/main/java/org/apache/struts2/components/If.java +++ b/core/src/main/java/org/apache/struts2/components/If.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/Include.java b/core/src/main/java/org/apache/struts2/components/Include.java index 5eff394246..f8decac25f 100644 --- a/core/src/main/java/org/apache/struts2/components/Include.java +++ b/core/src/main/java/org/apache/struts2/components/Include.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.RequestDispatcher; import jakarta.servlet.ServletException; import jakarta.servlet.ServletOutputStream; diff --git a/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java b/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java index 4c934545ab..8692daf943 100644 --- a/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java +++ b/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/org/apache/struts2/components/IteratorComponent.java b/core/src/main/java/org/apache/struts2/components/IteratorComponent.java index 1a87c53ce1..f45452ddfe 100644 --- a/core/src/main/java/org/apache/struts2/components/IteratorComponent.java +++ b/core/src/main/java/org/apache/struts2/components/IteratorComponent.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.ognl.ThreadAllowlist; diff --git a/core/src/main/java/org/apache/struts2/components/Label.java b/core/src/main/java/org/apache/struts2/components/Label.java index ff6c5d0617..52ba02ac79 100644 --- a/core/src/main/java/org/apache/struts2/components/Label.java +++ b/core/src/main/java/org/apache/struts2/components/Label.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.util.TextProviderHelper; diff --git a/core/src/main/java/org/apache/struts2/components/Link.java b/core/src/main/java/org/apache/struts2/components/Link.java index e147f58ac6..5c29765f73 100644 --- a/core/src/main/java/org/apache/struts2/components/Link.java +++ b/core/src/main/java/org/apache/struts2/components/Link.java @@ -19,7 +19,7 @@ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/ListUIBean.java b/core/src/main/java/org/apache/struts2/components/ListUIBean.java index 55605d87ab..b5b11f053b 100644 --- a/core/src/main/java/org/apache/struts2/components/ListUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/ListUIBean.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.util.ContainUtil; import org.apache.struts2.util.MakeIterator; diff --git a/core/src/main/java/org/apache/struts2/components/MergeIterator.java b/core/src/main/java/org/apache/struts2/components/MergeIterator.java index 762cfa2a7e..2a5270b443 100644 --- a/core/src/main/java/org/apache/struts2/components/MergeIterator.java +++ b/core/src/main/java/org/apache/struts2/components/MergeIterator.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.components.Param.UnnamedParametric; diff --git a/core/src/main/java/org/apache/struts2/components/Number.java b/core/src/main/java/org/apache/struts2/components/Number.java index f1e1d79b18..db101faff4 100644 --- a/core/src/main/java/org/apache/struts2/components/Number.java +++ b/core/src/main/java/org/apache/struts2/components/Number.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.views.annotations.StrutsTag; diff --git a/core/src/main/java/org/apache/struts2/components/OptGroup.java b/core/src/main/java/org/apache/struts2/components/OptGroup.java index 7f83e57081..0472c73ab9 100644 --- a/core/src/main/java/org/apache/struts2/components/OptGroup.java +++ b/core/src/main/java/org/apache/struts2/components/OptGroup.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java b/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java index fb2045674d..fc3bcd5198 100644 --- a/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java +++ b/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/org/apache/struts2/components/Param.java b/core/src/main/java/org/apache/struts2/components/Param.java index c2c299e7ec..6fcd70a2eb 100644 --- a/core/src/main/java/org/apache/struts2/components/Param.java +++ b/core/src/main/java/org/apache/struts2/components/Param.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.StrutsException; import org.apache.struts2.views.annotations.StrutsTag; @@ -179,12 +179,12 @@ public void setName(String name) { public void setValue(String value) { this.value = value; } - + @StrutsTagAttribute(description="Whether to suppress empty parameters", type="Boolean", defaultValue="false") public void setSuppressEmptyParameters(boolean suppressEmptyParameters) { this.suppressEmptyParameters = suppressEmptyParameters; } - + /** *

    * Tags can implement this to support nested param tags without the name attribute. diff --git a/core/src/main/java/org/apache/struts2/components/Password.java b/core/src/main/java/org/apache/struts2/components/Password.java index 637cca00a0..471f7dbd24 100644 --- a/core/src/main/java/org/apache/struts2/components/Password.java +++ b/core/src/main/java/org/apache/struts2/components/Password.java @@ -24,7 +24,7 @@ import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * diff --git a/core/src/main/java/org/apache/struts2/components/Property.java b/core/src/main/java/org/apache/struts2/components/Property.java index 4351a8507f..f57bd1cb48 100644 --- a/core/src/main/java/org/apache/struts2/components/Property.java +++ b/core/src/main/java/org/apache/struts2/components/Property.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.text.StringEscapeUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/components/Push.java b/core/src/main/java/org/apache/struts2/components/Push.java index c2752e0bff..94494d366b 100644 --- a/core/src/main/java/org/apache/struts2/components/Push.java +++ b/core/src/main/java/org/apache/struts2/components/Push.java @@ -23,7 +23,7 @@ import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * @@ -145,5 +145,5 @@ public boolean end(Writer writer, String body) { public void setValue(String value) { this.value = value; } - + } diff --git a/core/src/main/java/org/apache/struts2/components/Radio.java b/core/src/main/java/org/apache/struts2/components/Radio.java index 2b53484d06..d0d3eb1465 100644 --- a/core/src/main/java/org/apache/struts2/components/Radio.java +++ b/core/src/main/java/org/apache/struts2/components/Radio.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.views.annotations.StrutsTag; diff --git a/core/src/main/java/org/apache/struts2/components/Reset.java b/core/src/main/java/org/apache/struts2/components/Reset.java index 5da1b49368..c1ec34ca2b 100644 --- a/core/src/main/java/org/apache/struts2/components/Reset.java +++ b/core/src/main/java/org/apache/struts2/components/Reset.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/Script.java b/core/src/main/java/org/apache/struts2/components/Script.java index cc4061bf06..6cb14bc95d 100644 --- a/core/src/main/java/org/apache/struts2/components/Script.java +++ b/core/src/main/java/org/apache/struts2/components/Script.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; @@ -128,7 +128,7 @@ public void setCrossorigin(String crossorigin) { public boolean usesBody() { return true; } - + @Override protected void evaluateExtraParams() { super.evaluateExtraParams(); diff --git a/core/src/main/java/org/apache/struts2/components/Select.java b/core/src/main/java/org/apache/struts2/components/Select.java index adc19c86e1..f1a8e5b6df 100644 --- a/core/src/main/java/org/apache/struts2/components/Select.java +++ b/core/src/main/java/org/apache/struts2/components/Select.java @@ -24,7 +24,7 @@ import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * diff --git a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java index e9eed28540..c6bfec306b 100644 --- a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java +++ b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java @@ -18,11 +18,11 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.RequestDispatcher; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/components/Set.java b/core/src/main/java/org/apache/struts2/components/Set.java index 750763050c..19198e4e57 100644 --- a/core/src/main/java/org/apache/struts2/components/Set.java +++ b/core/src/main/java/org/apache/struts2/components/Set.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.dispatcher.DispatcherConstants; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/Submit.java b/core/src/main/java/org/apache/struts2/components/Submit.java index eceb5df3dd..47024e99c9 100644 --- a/core/src/main/java/org/apache/struts2/components/Submit.java +++ b/core/src/main/java/org/apache/struts2/components/Submit.java @@ -26,7 +26,7 @@ import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/components/Text.java b/core/src/main/java/org/apache/struts2/components/Text.java index 38cde39cec..4f9ea316d6 100644 --- a/core/src/main/java/org/apache/struts2/components/Text.java +++ b/core/src/main/java/org/apache/struts2/components/Text.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; @@ -52,7 +52,7 @@ * tag will be used as default message. If no value is found, the key of the * message will not be written out. *

    - * + * *

    * Note: If the var attribute is used with this tag, the tag's value will * not be written out. Instead the result will be saved into the @@ -146,7 +146,7 @@ public void setName(String name) { public void setEscapeHtml(boolean escape) { this.escapeHtml = escape; } - + @StrutsTagAttribute(description="Whether to escape Javascript", type="Boolean", defaultValue="false") public void setEscapeJavaScript(boolean escapeJavaScript) { this.escapeJavaScript = escapeJavaScript; diff --git a/core/src/main/java/org/apache/struts2/components/TextArea.java b/core/src/main/java/org/apache/struts2/components/TextArea.java index b61f595cbc..7f3babf561 100644 --- a/core/src/main/java/org/apache/struts2/components/TextArea.java +++ b/core/src/main/java/org/apache/struts2/components/TextArea.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/TextField.java b/core/src/main/java/org/apache/struts2/components/TextField.java index f03ef8024c..90f50e5194 100644 --- a/core/src/main/java/org/apache/struts2/components/TextField.java +++ b/core/src/main/java/org/apache/struts2/components/TextField.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; diff --git a/core/src/main/java/org/apache/struts2/components/Token.java b/core/src/main/java/org/apache/struts2/components/Token.java index 7d64a12b03..e5bc6a2baa 100644 --- a/core/src/main/java/org/apache/struts2/components/Token.java +++ b/core/src/main/java/org/apache/struts2/components/Token.java @@ -26,7 +26,7 @@ import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.util.TokenHelper; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * diff --git a/core/src/main/java/org/apache/struts2/components/UIBean.java b/core/src/main/java/org/apache/struts2/components/UIBean.java index 65bf468c3a..ca3d79dbc3 100644 --- a/core/src/main/java/org/apache/struts2/components/UIBean.java +++ b/core/src/main/java/org/apache/struts2/components/UIBean.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpSession; diff --git a/core/src/main/java/org/apache/struts2/components/URL.java b/core/src/main/java/org/apache/struts2/components/URL.java index 13de887033..517aabaf62 100644 --- a/core/src/main/java/org/apache/struts2/components/URL.java +++ b/core/src/main/java/org/apache/struts2/components/URL.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.StrutsConstants; diff --git a/core/src/main/java/org/apache/struts2/components/UpDownSelect.java b/core/src/main/java/org/apache/struts2/components/UpDownSelect.java index 727efa3954..12ab3c46cd 100644 --- a/core/src/main/java/org/apache/struts2/components/UpDownSelect.java +++ b/core/src/main/java/org/apache/struts2/components/UpDownSelect.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/org/apache/struts2/components/UrlProvider.java b/core/src/main/java/org/apache/struts2/components/UrlProvider.java index cf1e56256a..477a8b6c26 100644 --- a/core/src/main/java/org/apache/struts2/components/UrlProvider.java +++ b/core/src/main/java/org/apache/struts2/components/UrlProvider.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/components/date/DateTimeFormatterAdapter.java b/core/src/main/java/org/apache/struts2/components/date/DateTimeFormatterAdapter.java index 05767ab1b3..f68236414b 100644 --- a/core/src/main/java/org/apache/struts2/components/date/DateTimeFormatterAdapter.java +++ b/core/src/main/java/org/apache/struts2/components/date/DateTimeFormatterAdapter.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components.date; -import com.opensymphony.xwork2.ActionContext; +import org.apache.struts2.ActionContext; import java.time.format.DateTimeFormatter; import java.time.format.FormatStyle; diff --git a/core/src/main/java/org/apache/struts2/components/date/SimpleDateFormatAdapter.java b/core/src/main/java/org/apache/struts2/components/date/SimpleDateFormatAdapter.java index b7cf5441ac..8babfca475 100644 --- a/core/src/main/java/org/apache/struts2/components/date/SimpleDateFormatAdapter.java +++ b/core/src/main/java/org/apache/struts2/components/date/SimpleDateFormatAdapter.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components.date; -import com.opensymphony.xwork2.ActionContext; +import org.apache.struts2.ActionContext; import java.text.DateFormat; import java.text.SimpleDateFormat; diff --git a/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java index e8b5743f7b..9ebcd116d1 100644 --- a/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java +++ b/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.components.template; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.ServletActionContext; diff --git a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java index 2f46a42ed9..99c1d4797f 100644 --- a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java +++ b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java @@ -18,11 +18,11 @@ */ package org.apache.struts2.components.template; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.ValueStack; import freemarker.core.ParseException; import freemarker.template.Configuration; import freemarker.template.SimpleHash; diff --git a/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java index 7707a050c1..790f3d8591 100644 --- a/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java +++ b/core/src/main/java/org/apache/struts2/components/template/JspTemplateEngine.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.components.template; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.jsp.PageContext; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java b/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java index e46c61a5e2..3e7b8cfd59 100644 --- a/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java +++ b/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.components.template; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.StrutsConstants; diff --git a/core/src/main/java/org/apache/struts2/components/template/TemplateRenderingContext.java b/core/src/main/java/org/apache/struts2/components/template/TemplateRenderingContext.java index 7b639d85d1..50251a106f 100644 --- a/core/src/main/java/org/apache/struts2/components/template/TemplateRenderingContext.java +++ b/core/src/main/java/org/apache/struts2/components/template/TemplateRenderingContext.java @@ -23,7 +23,7 @@ import org.apache.struts2.components.UIBean; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * Context used when rendering templates. diff --git a/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java index f672ae0418..e0b08bd6b8 100644 --- a/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java +++ b/core/src/main/java/org/apache/struts2/config/AbstractBeanSelectionProvider.java @@ -18,14 +18,19 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.BeanSelectionProvider; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.inject.*; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.BeanSelectionProvider; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.inject.*; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Context; +import org.apache.struts2.inject.Factory; +import org.apache.struts2.inject.Scope; import java.util.Properties; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/BeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/config/BeanSelectionProvider.java rename to core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java index 687943d364..be5e9e8ed1 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/BeanSelectionProvider.java +++ b/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; /** * When implemented allows to alias already existing beans diff --git a/core/src/main/java/com/opensymphony/xwork2/config/Configuration.java b/core/src/main/java/org/apache/struts2/config/Configuration.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/config/Configuration.java rename to core/src/main/java/org/apache/struts2/config/Configuration.java index 3f170b19d6..131a62263a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/Configuration.java +++ b/core/src/main/java/org/apache/struts2/config/Configuration.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig; -import com.opensymphony.xwork2.inject.Container; +import org.apache.struts2.config.entities.PackageConfig; +import org.apache.struts2.config.entities.UnknownHandlerConfig; +import org.apache.struts2.inject.Container; import java.io.Serializable; import java.util.List; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationException.java b/core/src/main/java/org/apache/struts2/config/ConfigurationException.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/config/ConfigurationException.java rename to core/src/main/java/org/apache/struts2/config/ConfigurationException.java index b9c34247b8..e98bdc576e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationException.java +++ b/core/src/main/java/org/apache/struts2/config/ConfigurationException.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java b/core/src/main/java/org/apache/struts2/config/ConfigurationManager.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java rename to core/src/main/java/org/apache/struts2/config/ConfigurationManager.java index 49517eedf1..d9bbc4acaf 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java +++ b/core/src/main/java/org/apache/struts2/config/ConfigurationManager.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; -import com.opensymphony.xwork2.config.impl.DefaultConfiguration; -import com.opensymphony.xwork2.config.providers.StrutsDefaultConfigurationProvider; +import org.apache.struts2.config.impl.DefaultConfiguration; +import org.apache.struts2.config.providers.StrutsDefaultConfigurationProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -55,7 +55,7 @@ public ConfigurationManager(String name) { /** * @return the current XWork configuration object. By default an instance of DefaultConfiguration will be returned * - * @see com.opensymphony.xwork2.config.impl.DefaultConfiguration + * @see org.apache.struts2.config.impl.DefaultConfiguration */ public synchronized Configuration getConfiguration() { if (wasConfigInitialised()) { diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/ConfigurationProvider.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/ConfigurationProvider.java rename to core/src/main/java/org/apache/struts2/config/ConfigurationProvider.java index 2140d51fa6..44e5d7d5fc 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/ConfigurationProvider.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; /** * Interface to be implemented by all forms of XWork configuration classes. diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java b/core/src/main/java/org/apache/struts2/config/ConfigurationUtil.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java rename to core/src/main/java/org/apache/struts2/config/ConfigurationUtil.java index 06381c5b01..48d73ff8aa 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java +++ b/core/src/main/java/org/apache/struts2/config/ConfigurationUtil.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; -import com.opensymphony.xwork2.config.entities.PackageConfig; +import org.apache.struts2.config.entities.PackageConfig; import org.apache.commons.lang3.ClassUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ContainerProvider.java b/core/src/main/java/org/apache/struts2/config/ContainerProvider.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/config/ContainerProvider.java rename to core/src/main/java/org/apache/struts2/config/ContainerProvider.java index e43bf8134c..fe04a76d6c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/ContainerProvider.java +++ b/core/src/main/java/org/apache/struts2/config/ContainerProvider.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.util.location.LocatableProperties; /** diff --git a/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java b/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java index cdc14723ab..d0009ec183 100644 --- a/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java +++ b/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.util.location.LocatableProperties; /** * Loads the default properties, separate from the usual struts.properties loading diff --git a/core/src/main/java/org/apache/struts2/config/DefaultSettings.java b/core/src/main/java/org/apache/struts2/config/DefaultSettings.java index fc16c61ae7..ef5fde1197 100644 --- a/core/src/main/java/org/apache/struts2/config/DefaultSettings.java +++ b/core/src/main/java/org/apache/struts2/config/DefaultSettings.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Location; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsConstants; @@ -43,8 +43,8 @@ public class DefaultSettings implements Settings { private Settings delegate; /** - * Constructs an instance by loading the standard property files, - * any custom property files (struts.custom.properties), + * Constructs an instance by loading the standard property files, + * any custom property files (struts.custom.properties), * and any custom message resources (). *

    * Since this constructor combines Settings from multiple resources, diff --git a/core/src/main/java/org/apache/struts2/config/DelegatingSettings.java b/core/src/main/java/org/apache/struts2/config/DelegatingSettings.java index ef4ce31f24..16c4aba48d 100644 --- a/core/src/main/java/org/apache/struts2/config/DelegatingSettings.java +++ b/core/src/main/java/org/apache/struts2/config/DelegatingSettings.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Location; import java.util.HashSet; import java.util.Iterator; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerFactoryProvider.java b/core/src/main/java/org/apache/struts2/config/FileManagerFactoryProvider.java similarity index 86% rename from core/src/main/java/com/opensymphony/xwork2/config/FileManagerFactoryProvider.java rename to core/src/main/java/org/apache/struts2/config/FileManagerFactoryProvider.java index d572b4c7a8..5c015f0e0a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerFactoryProvider.java +++ b/core/src/main/java/org/apache/struts2/config/FileManagerFactoryProvider.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.util.location.LocatableProperties; /** * Allows to specify custom {@link FileManagerFactory} diff --git a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerProvider.java b/core/src/main/java/org/apache/struts2/config/FileManagerProvider.java similarity index 86% rename from core/src/main/java/com/opensymphony/xwork2/config/FileManagerProvider.java rename to core/src/main/java/org/apache/struts2/config/FileManagerProvider.java index 632882b942..20718746cc 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/FileManagerProvider.java +++ b/core/src/main/java/org/apache/struts2/config/FileManagerProvider.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.FileManager; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.util.location.LocatableProperties; /** * Allows to specify custom {@link FileManager} by user diff --git a/core/src/main/java/org/apache/struts2/config/NullResult.java b/core/src/main/java/org/apache/struts2/config/NullResult.java index 5b29b6787a..4ecdf5d484 100644 --- a/core/src/main/java/org/apache/struts2/config/NullResult.java +++ b/core/src/main/java/org/apache/struts2/config/NullResult.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.Result; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.Result; /** * Null result to get around annotation defaults that can't be null diff --git a/core/src/main/java/com/opensymphony/xwork2/config/PackageProvider.java b/core/src/main/java/org/apache/struts2/config/PackageProvider.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/config/PackageProvider.java rename to core/src/main/java/org/apache/struts2/config/PackageProvider.java index fd25639dca..adf8ae4a1b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/PackageProvider.java +++ b/core/src/main/java/org/apache/struts2/config/PackageProvider.java @@ -16,23 +16,23 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; /** - * Provides configuration packages. The separate init and loadPackages calls are due to the need to + * Provides configuration packages. The separate init and loadPackages calls are due to the need to * preserve backwards compatibility with the 2.0 {@link ConfigurationProvider} interface - * + * * @since 2.1 */ public interface PackageProvider { - + /** * Initializes with the configuration * @param configuration The configuration * @throws ConfigurationException If anything goes wrong */ void init(Configuration configuration) throws ConfigurationException; - + /** * Tells whether the PackageProvider should reload its configuration * @@ -45,5 +45,5 @@ public interface PackageProvider { * @throws ConfigurationException in case of configuration errors */ void loadPackages() throws ConfigurationException; - + } diff --git a/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java index 69be377155..a5b46fd823 100644 --- a/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java @@ -18,11 +18,11 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.util.location.LocatableProperties; import java.util.Iterator; diff --git a/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java b/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java index 1a79a714cf..e7dbf51a2c 100644 --- a/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java +++ b/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.location.LocatableProperties; -import com.opensymphony.xwork2.util.location.Location; -import com.opensymphony.xwork2.util.location.LocationImpl; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.location.LocatableProperties; +import org.apache.struts2.util.location.Location; +import org.apache.struts2.util.location.LocationImpl; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/RuntimeConfiguration.java b/core/src/main/java/org/apache/struts2/config/RuntimeConfiguration.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/config/RuntimeConfiguration.java rename to core/src/main/java/org/apache/struts2/config/RuntimeConfiguration.java index 9d5b5421fa..57916423d7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/RuntimeConfiguration.java +++ b/core/src/main/java/org/apache/struts2/config/RuntimeConfiguration.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; -import com.opensymphony.xwork2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.ActionConfig; import java.io.Serializable; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/ServletContextAwareConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/ServletContextAwareConfigurationProvider.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/ServletContextAwareConfigurationProvider.java rename to core/src/main/java/org/apache/struts2/config/ServletContextAwareConfigurationProvider.java index 8dcd3eef7f..3cf98e5630 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/ServletContextAwareConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/ServletContextAwareConfigurationProvider.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config; +package org.apache.struts2.config; import jakarta.servlet.ServletContext; diff --git a/core/src/main/java/org/apache/struts2/config/Settings.java b/core/src/main/java/org/apache/struts2/config/Settings.java index b9fb2ce448..37a69a8819 100644 --- a/core/src/main/java/org/apache/struts2/config/Settings.java +++ b/core/src/main/java/org/apache/struts2/config/Settings.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Location; import java.util.Iterator; @@ -36,7 +36,7 @@ interface Settings { String get(String name); /** - * Returns {@link com.opensymphony.xwork2.util.location.Location} of given setting + * Returns {@link org.apache.struts2.util.location.Location} of given setting * * @param name Name of the setting to locate * @return The location of the setting or null diff --git a/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java index a52a67749f..16e1c7ca38 100644 --- a/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java +++ b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java @@ -18,64 +18,64 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.ActionProxyFactory; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.UnknownHandlerManager; -import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor; -import com.opensymphony.xwork2.conversion.ConversionFileProcessor; -import com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.conversion.TypeConverterCreator; -import com.opensymphony.xwork2.conversion.TypeConverterHolder; -import com.opensymphony.xwork2.conversion.impl.ArrayConverter; -import com.opensymphony.xwork2.conversion.impl.CollectionConverter; -import com.opensymphony.xwork2.conversion.impl.DateConverter; -import com.opensymphony.xwork2.conversion.impl.NumberConverter; -import com.opensymphony.xwork2.conversion.impl.StringConverter; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.factory.ActionFactory; -import com.opensymphony.xwork2.factory.ConverterFactory; -import com.opensymphony.xwork2.factory.InterceptorFactory; -import com.opensymphony.xwork2.factory.ResultFactory; -import com.opensymphony.xwork2.factory.UnknownHandlerFactory; -import com.opensymphony.xwork2.factory.ValidatorFactory; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.ognl.BeanInfoCacheFactory; -import com.opensymphony.xwork2.ognl.ExpressionCacheFactory; -import com.opensymphony.xwork2.ognl.SecurityMemberAccess; -import com.opensymphony.xwork2.ognl.accessor.RootAccessor; -import com.opensymphony.xwork2.security.AcceptedPatternsChecker; -import com.opensymphony.xwork2.security.ExcludedPatternsChecker; -import com.opensymphony.xwork2.security.NotExcludedAcceptedPatternsChecker; -import com.opensymphony.xwork2.util.PatternMatcher; -import com.opensymphony.xwork2.util.TextParser; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.location.LocatableProperties; -import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; -import com.opensymphony.xwork2.validator.ActionValidatorManager; import ognl.MethodAccessor; +import org.apache.struts2.ActionProxyFactory; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.LocalizedTextProvider; +import org.apache.struts2.ObjectFactory; import org.apache.struts2.StrutsConstants; +import org.apache.struts2.TextProvider; +import org.apache.struts2.TextProviderFactory; +import org.apache.struts2.UnknownHandlerManager; import org.apache.struts2.components.UrlRenderer; import org.apache.struts2.components.date.DateFormatter; +import org.apache.struts2.conversion.ConversionAnnotationProcessor; +import org.apache.struts2.conversion.ConversionFileProcessor; +import org.apache.struts2.conversion.ConversionPropertiesProcessor; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.conversion.TypeConverterCreator; +import org.apache.struts2.conversion.TypeConverterHolder; +import org.apache.struts2.conversion.impl.ArrayConverter; +import org.apache.struts2.conversion.impl.CollectionConverter; +import org.apache.struts2.conversion.impl.DateConverter; +import org.apache.struts2.conversion.impl.NumberConverter; +import org.apache.struts2.conversion.impl.StringConverter; +import org.apache.struts2.conversion.impl.XWorkConverter; import org.apache.struts2.dispatcher.DispatcherErrorHandler; import org.apache.struts2.dispatcher.StaticContentLoader; import org.apache.struts2.dispatcher.mapper.ActionMapper; import org.apache.struts2.dispatcher.multipart.MultiPartRequest; +import org.apache.struts2.factory.ActionFactory; +import org.apache.struts2.factory.ConverterFactory; +import org.apache.struts2.factory.InterceptorFactory; +import org.apache.struts2.factory.ResultFactory; +import org.apache.struts2.factory.UnknownHandlerFactory; +import org.apache.struts2.factory.ValidatorFactory; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Scope; import org.apache.struts2.interceptor.exec.ExecutorProvider; +import org.apache.struts2.ognl.BeanInfoCacheFactory; +import org.apache.struts2.ognl.ExpressionCacheFactory; import org.apache.struts2.ognl.OgnlGuard; +import org.apache.struts2.ognl.SecurityMemberAccess; +import org.apache.struts2.ognl.accessor.RootAccessor; +import org.apache.struts2.security.AcceptedPatternsChecker; +import org.apache.struts2.security.ExcludedPatternsChecker; +import org.apache.struts2.security.NotExcludedAcceptedPatternsChecker; import org.apache.struts2.url.QueryStringBuilder; import org.apache.struts2.url.QueryStringParser; import org.apache.struts2.url.UrlDecoder; import org.apache.struts2.url.UrlEncoder; import org.apache.struts2.util.ContentTypeMatcher; +import org.apache.struts2.util.PatternMatcher; +import org.apache.struts2.util.TextParser; +import org.apache.struts2.util.ValueStackFactory; +import org.apache.struts2.util.location.LocatableProperties; +import org.apache.struts2.util.reflection.ReflectionContextFactory; +import org.apache.struts2.util.reflection.ReflectionProvider; +import org.apache.struts2.validator.ActionValidatorManager; import org.apache.struts2.views.freemarker.FreemarkerManager; import org.apache.struts2.views.util.UrlHelper; @@ -97,49 +97,49 @@ * Description * * - * com.opensymphony.xwork2.ObjectFactory + * org.apache.struts2.ObjectFactory * struts.objectFactory * singleton * Creates actions, results, and interceptors * * - * com.opensymphony.xwork2.factory.ActionFactory + * org.apache.struts2.factory.ActionFactory * struts.objectFactory.actionFactory * singleton * Dedicated factory used to create Actions, you can implement/extend existing one instead of defining new ObjectFactory * * - * com.opensymphony.xwork2.factory.ResultFactory + * org.apache.struts2.factory.ResultFactory * struts.objectFactory.resultFactory * singleton * Dedicated factory used to create Results, you can implement/extend existing one instead of defining new ObjectFactory * * - * com.opensymphony.xwork2.factory.InterceptorFactory + * org.apache.struts2.factory.InterceptorFactory * struts.objectFactory.interceptorFactory * singleton * Dedicated factory used to create Interceptors, you can implement/extend existing one instead of defining new ObjectFactory * * - * com.opensymphony.xwork2.factory.ConverterFactory + * org.apache.struts2.factory.ConverterFactory * struts.objectFactory.converterFactory * singleton * Dedicated factory used to create TypeConverters, you can implement/extend existing one instead of defining new ObjectFactory * * - * com.opensymphony.xwork2.factory.ValidatorFactory + * org.apache.struts2.factory.ValidatorFactory * struts.objectFactory.validatorFactory * singleton * Dedicated factory used to create Validators, you can implement/extend existing one instead of defining new ObjectFactory * * - * com.opensymphony.xwork2.ActionProxyFactory + * org.apache.struts2.ActionProxyFactory * struts.actionProxyFactory * singleton * Creates the ActionProxy * * - * com.opensymphony.xwork2.util.ObjectTypeDeterminer + * org.apache.struts2.util.ObjectTypeDeterminer * struts.objectTypeDeterminer * singleton * Determines what the key and element class of a Map or Collection should be @@ -169,38 +169,38 @@ * Loads and processes Velocity templates * * - * com.opensymphony.xwork2.validator.ActionValidatorManager + * org.apache.struts2.validator.ActionValidatorManager * struts.actionValidatorManager * singleton * Main interface for validation managers (regular and annotation based). Handles both the loading of * configuration and the actual validation (since 2.1) * * - * com.opensymphony.xwork2.util.ValueStackFactory + * org.apache.struts2.util.ValueStackFactory * struts.valueStackFactory * singleton * Creates value stacks (since 2.1) * * - * com.opensymphony.xwork2.reflection.ReflectionProvider + * org.apache.struts2.reflection.ReflectionProvider * struts.reflectionProvider * singleton * Provides reflection services, key place to plug in a custom expression language (since 2.1) * * - * com.opensymphony.xwork2.reflection.ReflectionContextFactory + * org.apache.struts2.reflection.ReflectionContextFactory * struts.reflectionContextFactory * singleton * Creates reflection context maps used for reflection and expression language operations (since 2.1) * * - * com.opensymphony.xwork2.config.PackageProvider + * org.apache.struts2.config.PackageProvider * N/A * singleton * All beans registered as PackageProvider implementations will be automatically included in configuration building (since 2.1) * * - * com.opensymphony.xwork2.util.PatternMatcher + * org.apache.struts2.util.PatternMatcher * struts.patternMatcher * singleton * Matches patterns, such as action names, generally used in configuration (since 2.1) @@ -212,25 +212,25 @@ * Loads static resources (since 2.1) * * - * com.opensymphony.xwork2.conversion.impl.XWorkConverter + * org.apache.struts2.conversion.impl.XWorkConverter * struts.xworkConverter * singleton * Handles conversion logic and allows to load custom converters per class or per action * * - * com.opensymphony.xwork2.TextProvider + * org.apache.struts2.TextProvider * struts.textProvider * default * Allows provide custom TextProvider for whole application, it's better to use struts.textProviderFactory * * - * com.opensymphony.xwork2.TextProviderFactory + * org.apache.struts2.TextProviderFactory * struts.textProviderFactory * default * Allows provide custom TextProviderFactory for whole application * * - * com.opensymphony.xwork2.LocaleProviderFactory + * org.apache.struts2.LocaleProviderFactory * struts.localeProviderFactory * singleton * Allows provide custom LocaleProvider for whole application @@ -242,7 +242,7 @@ * Allows provide custom implementation of environment specific URL rendering/creating class * * - * com.opensymphony.xwork2.UnknownHandlerManager + * org.apache.struts2.UnknownHandlerManager * struts.unknownHandlerManager * singleton * Implementation of this interface allows handle logic of unknown Actions, Methods or Results @@ -254,87 +254,87 @@ * Helper class used with URLRenderer to provide exact logic for building URLs * * - * com.opensymphony.xwork2.FileManagerFactory + * org.apache.struts2.FileManagerFactory * struts.fileManagerFactory * singleton * Used to create {@link FileManager} instance to access files on the File System as also to monitor if reload is needed, * can be implemented / overwritten to meet specific an application server needs * * - * com.opensymphony.xwork2.conversion.impl.CollectionConverter + * org.apache.struts2.conversion.impl.CollectionConverter * struts.converter.collection * singleton * Converter used to convert any object to Collection and back * * - * com.opensymphony.xwork2.conversion.impl.ArrayConverter + * org.apache.struts2.conversion.impl.ArrayConverter * struts.converter.array * singleton * Converter used to convert any object to Array and back * * - * com.opensymphony.xwork2.conversion.impl.DateConverter + * org.apache.struts2.conversion.impl.DateConverter * struts.converter.date * singleton * Converter used to convert any object to Date and back * * - * com.opensymphony.xwork2.conversion.impl.NumberConverter + * org.apache.struts2.conversion.impl.NumberConverter * struts.converter.number * singleton * Converter used to convert any object to Number and back * * - * com.opensymphony.xwork2.conversion.impl.StringConverter + * org.apache.struts2.conversion.impl.StringConverter * struts.converter.string * singleton * Converter used to convert any object to String and back * * - * com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor + * org.apache.struts2.conversion.ConversionPropertiesProcessor * struts.conversion.properties.processor * singleton * Process Properties to create converters * * - * com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor + * org.apache.struts2.conversion.ConversionPropertiesProcessor * struts.converter.file.processor * singleton * Process <class>-conversion.properties file create converters</class> * * - * com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor + * org.apache.struts2.conversion.ConversionAnnotationProcessor * struts.converter.annotation.processor * singleton * Process TypeConversion annotation to create converters * * - * com.opensymphony.xwork2.conversion.TypeConverterCreator + * org.apache.struts2.conversion.TypeConverterCreator * struts.converter.creator * singleton * Creates user converters * * - * com.opensymphony.xwork2.conversion.TypeConverterHolder + * org.apache.struts2.conversion.TypeConverterHolder * struts.converter.holder * singleton * Holds user converters' instances * * - * com.opensymphony.xwork2.util.TextParser + * org.apache.struts2.util.TextParser * struts.expression.parser * singleton * Used to parse expressions like ${foo.bar} or %{bar.foo} but it is up tp the TextParser's * implementation what kind of opening char to use (#, $, %, etc) * * - * com.opensymphony.xwork2.ExcludedPatternsChecker + * org.apache.struts2.ExcludedPatternsChecker * struts.excludedPatterns.checker * request * Used across different interceptors to check if given string matches one of the excluded patterns * * - * com.opensymphony.xwork2.AcceptedPatternsChecker + * org.apache.struts2.AcceptedPatternsChecker * struts.acceptedPatterns.checker * request * Used across different interceptors to check if given string matches one of the accepted patterns @@ -346,7 +346,7 @@ * Matches content type of uploaded files (since 2.3.22) * * - * com.opensymphony.xwork2.LocalizedTextProvider + * org.apache.struts2.LocalizedTextProvider * struts.localizedTextProvider * singleton * Provides access to resource bundles used to localise messages (since 2.5.11) diff --git a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java index 6636b37801..6fdccb794f 100644 --- a/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/StrutsJavaConfigurationProvider.java @@ -18,18 +18,18 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.config.BeanSelectionProvider; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig; -import com.opensymphony.xwork2.config.impl.LocatableFactory; -import com.opensymphony.xwork2.config.providers.ValueSubstitutor; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.location.LocatableProperties; -import com.opensymphony.xwork2.util.location.Location; -import com.opensymphony.xwork2.util.location.LocationUtils; +import org.apache.struts2.config.BeanSelectionProvider; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.config.entities.UnknownHandlerConfig; +import org.apache.struts2.config.impl.LocatableFactory; +import org.apache.struts2.config.providers.ValueSubstitutor; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.location.LocatableProperties; +import org.apache.struts2.util.location.Location; +import org.apache.struts2.util.location.LocationUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.config.entities.BeanConfig; diff --git a/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java index 48d223d2c2..12a57a3a89 100644 --- a/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java @@ -18,13 +18,13 @@ */ package org.apache.struts2.config; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Context; -import com.opensymphony.xwork2.inject.Factory; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.ActionContext; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.providers.XmlConfigurationProvider; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Context; +import org.apache.struts2.inject.Factory; +import org.apache.struts2.util.location.LocatableProperties; import jakarta.servlet.ServletContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -92,9 +92,6 @@ public StrutsXmlConfigurationProvider(String filename, ServletContext ctx) { } } - /* (non-Javadoc) - * @see com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#register(com.opensymphony.xwork2.inject.ContainerBuilder, java.util.Properties) - */ @Override public void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException { if (servletContext != null && !containerBuilder.contains(ServletContext.class)) { @@ -114,7 +111,7 @@ public Class type() { } /* (non-Javadoc) - * @see com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#init(com.opensymphony.xwork2.config.Configuration) + * @see org.apache.struts2.config.providers.XmlConfigurationProvider#init(org.apache.struts2.config.Configuration) */ @Override public void loadPackages() { @@ -127,7 +124,7 @@ public void loadPackages() { * Look for the configuration file on the classpath and in the file system * * @param fileName The file name to retrieve - * @see com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#getConfigurationUrls + * @see org.apache.struts2.config.providers.XmlConfigurationProvider#getConfigurationUrls */ @Override protected Iterator getConfigurationUrls(String fileName) throws IOException { diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java b/core/src/main/java/org/apache/struts2/config/entities/ActionConfig.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/ActionConfig.java index f259400d54..53599638ab 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/ActionConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import org.apache.commons.lang3.StringUtils; import java.io.Serializable; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java b/core/src/main/java/org/apache/struts2/config/entities/AllowedMethods.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java rename to core/src/main/java/org/apache/struts2/config/entities/AllowedMethods.java index 1967dd7db8..9cc6c883d9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/AllowedMethods.java +++ b/core/src/main/java/org/apache/struts2/config/entities/AllowedMethods.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/config/entities/BeanConfig.java b/core/src/main/java/org/apache/struts2/config/entities/BeanConfig.java index d01db0f0db..7caa798dff 100644 --- a/core/src/main/java/org/apache/struts2/config/entities/BeanConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/BeanConfig.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Scope; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Scope; public class BeanConfig { private final Class clazz; diff --git a/core/src/main/java/org/apache/struts2/config/entities/BeanSelectionConfig.java b/core/src/main/java/org/apache/struts2/config/entities/BeanSelectionConfig.java index dfa76974df..4ad6968ca2 100644 --- a/core/src/main/java/org/apache/struts2/config/entities/BeanSelectionConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/BeanSelectionConfig.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.config.BeanSelectionProvider; -import com.opensymphony.xwork2.inject.Container; +import org.apache.struts2.config.BeanSelectionProvider; +import org.apache.struts2.inject.Container; public class BeanSelectionConfig { diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java b/core/src/main/java/org/apache/struts2/config/entities/ExceptionMappingConfig.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/ExceptionMappingConfig.java index 0b43670066..73fb41f298 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/ExceptionMappingConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import java.io.Serializable; import java.util.Collections; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java b/core/src/main/java/org/apache/struts2/config/entities/InterceptorConfig.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/InterceptorConfig.java index 69974a1340..ee10cd8806 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/InterceptorConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import java.io.Serializable; import java.util.Collections; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorListHolder.java b/core/src/main/java/org/apache/struts2/config/entities/InterceptorListHolder.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorListHolder.java rename to core/src/main/java/org/apache/struts2/config/entities/InterceptorListHolder.java index ab9829afa0..fa39778b32 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorListHolder.java +++ b/core/src/main/java/org/apache/struts2/config/entities/InterceptorListHolder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; import java.util.List; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorLocator.java b/core/src/main/java/org/apache/struts2/config/entities/InterceptorLocator.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorLocator.java rename to core/src/main/java/org/apache/struts2/config/entities/InterceptorLocator.java index 178ec3dbc7..3c5fad99a8 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorLocator.java +++ b/core/src/main/java/org/apache/struts2/config/entities/InterceptorLocator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; /** * Defines an object that can be used to retrieve interceptor configuration diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java b/core/src/main/java/org/apache/struts2/config/entities/InterceptorMapping.java similarity index 83% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java rename to core/src/main/java/org/apache/struts2/config/entities/InterceptorMapping.java index 1c0a9d01f2..cb5f88388a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java +++ b/core/src/main/java/org/apache/struts2/config/entities/InterceptorMapping.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.interceptor.Interceptor; +import org.apache.struts2.interceptor.Interceptor; import java.io.Serializable; import java.util.HashMap; @@ -37,14 +37,6 @@ public class InterceptorMapping implements Serializable { private final Interceptor interceptor; private final Map params; - public InterceptorMapping(String name, org.apache.struts2.interceptor.Interceptor interceptor) { - this(name, Interceptor.adapt(interceptor)); - } - - public InterceptorMapping(String name, org.apache.struts2.interceptor.Interceptor interceptor, Map params) { - this(name, Interceptor.adapt(interceptor), params); - } - public InterceptorMapping(String name, Interceptor interceptor) { this(name, interceptor, new HashMap<>()); } diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java b/core/src/main/java/org/apache/struts2/config/entities/InterceptorStackConfig.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/InterceptorStackConfig.java index bcd9a3da0d..03ae5a92a5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/InterceptorStackConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import java.io.Serial; import java.io.Serializable; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java b/core/src/main/java/org/apache/struts2/config/entities/PackageConfig.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/PackageConfig.java index 753cc64ff5..ccf2e756fb 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/PackageConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import java.io.Serializable; import java.util.ArrayList; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/Parameterizable.java b/core/src/main/java/org/apache/struts2/config/entities/Parameterizable.java similarity index 88% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/Parameterizable.java rename to core/src/main/java/org/apache/struts2/config/entities/Parameterizable.java index cae046e78a..f00c73d3c8 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/Parameterizable.java +++ b/core/src/main/java/org/apache/struts2/config/entities/Parameterizable.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; import java.util.Map; @@ -28,7 +28,7 @@ *

    * *

    - * The {@link com.opensymphony.xwork2.interceptor.StaticParametersInterceptor} must be in the action's interceptor + * The {@link org.apache.struts2.interceptor.StaticParametersInterceptor} must be in the action's interceptor * queue for this to work. *

    * diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java b/core/src/main/java/org/apache/struts2/config/entities/ResultConfig.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/ResultConfig.java index f0d7752aa5..5e2a1daae7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/ResultConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import java.io.Serializable; import java.util.Collections; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java b/core/src/main/java/org/apache/struts2/config/entities/ResultTypeConfig.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/ResultTypeConfig.java index 723319ed84..d03e65ecad 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/ResultTypeConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import java.io.Serializable; import java.util.Collections; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/UnknownHandlerConfig.java b/core/src/main/java/org/apache/struts2/config/entities/UnknownHandlerConfig.java similarity index 88% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/UnknownHandlerConfig.java rename to core/src/main/java/org/apache/struts2/config/entities/UnknownHandlerConfig.java index b6732fa257..2e22ee8ee0 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/UnknownHandlerConfig.java +++ b/core/src/main/java/org/apache/struts2/config/entities/UnknownHandlerConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.entities; +package org.apache.struts2.config.entities; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; public class UnknownHandlerConfig extends Located { diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/package.html b/core/src/main/java/org/apache/struts2/config/entities/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/config/entities/package.html rename to core/src/main/java/org/apache/struts2/config/entities/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java b/core/src/main/java/org/apache/struts2/config/impl/AbstractMatcher.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java rename to core/src/main/java/org/apache/struts2/config/impl/AbstractMatcher.java index ed5e053761..b4e1e6b704 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java +++ b/core/src/main/java/org/apache/struts2/config/impl/AbstractMatcher.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; +package org.apache.struts2.config.impl; -import com.opensymphony.xwork2.util.PatternMatcher; +import org.apache.struts2.util.PatternMatcher; import org.apache.commons.lang3.math.NumberUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -59,7 +59,7 @@ public abstract class AbstractMatcher implements Serializable { /** * This flag controls if passed named params should be appended * to the map in {@link #replaceParameters(Map, Map)} - * and will be accessible in {@link com.opensymphony.xwork2.config.entities.ResultConfig}. + * and will be accessible in {@link org.apache.struts2.config.entities.ResultConfig}. * If set to false, the named parameters won't be appended. *

    * This behaviour is controlled by {@link org.apache.struts2.StrutsConstants#STRUTS_MATCHER_APPEND_NAMED_PARAMETERS} diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java b/core/src/main/java/org/apache/struts2/config/impl/ActionConfigMatcher.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java rename to core/src/main/java/org/apache/struts2/config/impl/ActionConfigMatcher.java index 2bf4c6c726..0cd42f4f14 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java +++ b/core/src/main/java/org/apache/struts2/config/impl/ActionConfigMatcher.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; +package org.apache.struts2.config.impl; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.util.PatternMatcher; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.ExceptionMappingConfig; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.util.PatternMatcher; import org.apache.commons.lang3.StringUtils; import java.io.Serializable; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java b/core/src/main/java/org/apache/struts2/config/impl/DefaultConfiguration.java similarity index 83% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java rename to core/src/main/java/org/apache/struts2/config/impl/DefaultConfiguration.java index de3af59874..b7bc934259 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java +++ b/core/src/main/java/org/apache/struts2/config/impl/DefaultConfiguration.java @@ -16,91 +16,91 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.DefaultLocaleProviderFactory; -import com.opensymphony.xwork2.DefaultTextProvider; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.StrutsTextProviderFactory; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ContainerProvider; -import com.opensymphony.xwork2.config.FileManagerFactoryProvider; -import com.opensymphony.xwork2.config.FileManagerProvider; -import com.opensymphony.xwork2.config.PackageProvider; -import com.opensymphony.xwork2.config.RuntimeConfiguration; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.InterceptorMapping; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.config.entities.ResultTypeConfig; -import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig; -import com.opensymphony.xwork2.config.providers.EnvsValueSubstitutor; -import com.opensymphony.xwork2.config.providers.InterceptorBuilder; -import com.opensymphony.xwork2.config.providers.ValueSubstitutor; -import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor; -import com.opensymphony.xwork2.conversion.ConversionFileProcessor; -import com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.conversion.TypeConverterCreator; -import com.opensymphony.xwork2.conversion.TypeConverterHolder; -import com.opensymphony.xwork2.conversion.impl.ArrayConverter; -import com.opensymphony.xwork2.conversion.impl.CollectionConverter; -import com.opensymphony.xwork2.conversion.impl.DateConverter; -import com.opensymphony.xwork2.conversion.impl.DefaultConversionAnnotationProcessor; -import com.opensymphony.xwork2.conversion.impl.DefaultConversionFileProcessor; -import com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer; -import com.opensymphony.xwork2.conversion.impl.NumberConverter; -import com.opensymphony.xwork2.conversion.impl.StringConverter; -import com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.factory.ActionFactory; -import com.opensymphony.xwork2.factory.ConverterFactory; -import com.opensymphony.xwork2.factory.DefaultActionFactory; -import com.opensymphony.xwork2.factory.DefaultInterceptorFactory; -import com.opensymphony.xwork2.factory.DefaultResultFactory; -import com.opensymphony.xwork2.factory.DefaultUnknownHandlerFactory; -import com.opensymphony.xwork2.factory.DefaultValidatorFactory; -import com.opensymphony.xwork2.factory.InterceptorFactory; -import com.opensymphony.xwork2.factory.ResultFactory; -import com.opensymphony.xwork2.factory.StrutsConverterFactory; -import com.opensymphony.xwork2.factory.UnknownHandlerFactory; -import com.opensymphony.xwork2.factory.ValidatorFactory; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Context; -import com.opensymphony.xwork2.inject.Factory; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.ognl.BeanInfoCacheFactory; -import com.opensymphony.xwork2.ognl.DefaultOgnlBeanInfoCacheFactory; -import com.opensymphony.xwork2.ognl.DefaultOgnlExpressionCacheFactory; -import com.opensymphony.xwork2.ognl.ExpressionCacheFactory; -import com.opensymphony.xwork2.ognl.OgnlCacheFactory; -import com.opensymphony.xwork2.ognl.OgnlReflectionProvider; -import com.opensymphony.xwork2.ognl.OgnlUtil; -import com.opensymphony.xwork2.ognl.OgnlValueStackFactory; -import com.opensymphony.xwork2.ognl.SecurityMemberAccess; -import com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor; -import com.opensymphony.xwork2.ognl.accessor.RootAccessor; -import com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor; -import com.opensymphony.xwork2.util.OgnlTextParser; -import com.opensymphony.xwork2.util.PatternMatcher; -import com.opensymphony.xwork2.util.StrutsLocalizedTextProvider; -import com.opensymphony.xwork2.util.TextParser; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.fs.DefaultFileManager; -import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory; -import com.opensymphony.xwork2.util.location.LocatableProperties; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +package org.apache.struts2.config.impl; + +import org.apache.struts2.ActionContext; +import org.apache.struts2.DefaultLocaleProviderFactory; +import org.apache.struts2.DefaultTextProvider; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.LocalizedTextProvider; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.StrutsTextProviderFactory; +import org.apache.struts2.TextProvider; +import org.apache.struts2.TextProviderFactory; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ContainerProvider; +import org.apache.struts2.config.FileManagerFactoryProvider; +import org.apache.struts2.config.FileManagerProvider; +import org.apache.struts2.config.PackageProvider; +import org.apache.struts2.config.RuntimeConfiguration; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.InterceptorMapping; +import org.apache.struts2.config.entities.PackageConfig; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.config.entities.ResultTypeConfig; +import org.apache.struts2.config.entities.UnknownHandlerConfig; +import org.apache.struts2.config.providers.EnvsValueSubstitutor; +import org.apache.struts2.config.providers.InterceptorBuilder; +import org.apache.struts2.config.providers.ValueSubstitutor; +import org.apache.struts2.conversion.ConversionAnnotationProcessor; +import org.apache.struts2.conversion.ConversionFileProcessor; +import org.apache.struts2.conversion.ConversionPropertiesProcessor; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverterCreator; +import org.apache.struts2.conversion.TypeConverterHolder; +import org.apache.struts2.conversion.impl.ArrayConverter; +import org.apache.struts2.conversion.impl.CollectionConverter; +import org.apache.struts2.conversion.impl.DateConverter; +import org.apache.struts2.conversion.impl.DefaultConversionAnnotationProcessor; +import org.apache.struts2.conversion.impl.DefaultConversionFileProcessor; +import org.apache.struts2.conversion.impl.DefaultObjectTypeDeterminer; +import org.apache.struts2.conversion.impl.NumberConverter; +import org.apache.struts2.conversion.impl.StringConverter; +import org.apache.struts2.conversion.impl.XWorkBasicConverter; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.factory.ActionFactory; +import org.apache.struts2.factory.ConverterFactory; +import org.apache.struts2.factory.DefaultActionFactory; +import org.apache.struts2.factory.DefaultInterceptorFactory; +import org.apache.struts2.factory.DefaultResultFactory; +import org.apache.struts2.factory.DefaultUnknownHandlerFactory; +import org.apache.struts2.factory.DefaultValidatorFactory; +import org.apache.struts2.factory.InterceptorFactory; +import org.apache.struts2.factory.ResultFactory; +import org.apache.struts2.factory.StrutsConverterFactory; +import org.apache.struts2.factory.UnknownHandlerFactory; +import org.apache.struts2.factory.ValidatorFactory; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Context; +import org.apache.struts2.inject.Factory; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.ognl.BeanInfoCacheFactory; +import org.apache.struts2.ognl.DefaultOgnlBeanInfoCacheFactory; +import org.apache.struts2.ognl.DefaultOgnlExpressionCacheFactory; +import org.apache.struts2.ognl.ExpressionCacheFactory; +import org.apache.struts2.ognl.OgnlCacheFactory; +import org.apache.struts2.ognl.OgnlReflectionProvider; +import org.apache.struts2.ognl.OgnlUtil; +import org.apache.struts2.ognl.OgnlValueStackFactory; +import org.apache.struts2.ognl.SecurityMemberAccess; +import org.apache.struts2.ognl.accessor.CompoundRootAccessor; +import org.apache.struts2.ognl.accessor.RootAccessor; +import org.apache.struts2.ognl.accessor.XWorkMethodAccessor; +import org.apache.struts2.util.OgnlTextParser; +import org.apache.struts2.util.PatternMatcher; +import org.apache.struts2.util.StrutsLocalizedTextProvider; +import org.apache.struts2.util.TextParser; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; +import org.apache.struts2.util.fs.DefaultFileManager; +import org.apache.struts2.util.fs.DefaultFileManagerFactory; +import org.apache.struts2.util.location.LocatableProperties; +import org.apache.struts2.util.reflection.ReflectionProvider; import ognl.MethodAccessor; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; @@ -488,7 +488,7 @@ private void setDefaultResults(Map results, PackageConfig * @param baseConfig the ActionConfig which holds only the configuration specific to itself, without the defaults * and inheritance * @return a full ActionConfig for runtime configuration with all of the inherited and default params - * @throws com.opensymphony.xwork2.config.ConfigurationException + * @throws org.apache.struts2.config.ConfigurationException * */ private ActionConfig buildFullActionConfig(PackageConfig packageContext, ActionConfig baseConfig) throws ConfigurationException { diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/LocatableConstantFactory.java b/core/src/main/java/org/apache/struts2/config/impl/LocatableConstantFactory.java similarity index 84% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/LocatableConstantFactory.java rename to core/src/main/java/org/apache/struts2/config/impl/LocatableConstantFactory.java index 319448060e..a3476be6b7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/LocatableConstantFactory.java +++ b/core/src/main/java/org/apache/struts2/config/impl/LocatableConstantFactory.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; +package org.apache.struts2.config.impl; -import com.opensymphony.xwork2.inject.Context; -import com.opensymphony.xwork2.inject.Factory; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.LocationUtils; +import org.apache.struts2.inject.Context; +import org.apache.struts2.inject.Factory; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.LocationUtils; /** * Factory that remembers where a constant came from diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/LocatableFactory.java b/core/src/main/java/org/apache/struts2/config/impl/LocatableFactory.java similarity index 86% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/LocatableFactory.java rename to core/src/main/java/org/apache/struts2/config/impl/LocatableFactory.java index fdc282b349..95bb6acfb7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/LocatableFactory.java +++ b/core/src/main/java/org/apache/struts2/config/impl/LocatableFactory.java @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; +package org.apache.struts2.config.impl; -import com.opensymphony.xwork2.inject.Context; -import com.opensymphony.xwork2.inject.Factory; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.LocationUtils; +import org.apache.struts2.inject.Context; +import org.apache.struts2.inject.Factory; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.LocationUtils; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java b/core/src/main/java/org/apache/struts2/config/impl/MockConfiguration.java similarity index 82% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java rename to core/src/main/java/org/apache/struts2/config/impl/MockConfiguration.java index fd59b4bd74..cb8adb946f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java +++ b/core/src/main/java/org/apache/struts2/config/impl/MockConfiguration.java @@ -16,20 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; - -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ContainerProvider; -import com.opensymphony.xwork2.config.PackageProvider; -import com.opensymphony.xwork2.config.RuntimeConfiguration; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig; -import com.opensymphony.xwork2.config.providers.StrutsDefaultConfigurationProvider; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.util.location.LocatableProperties; +package org.apache.struts2.config.impl; + +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ContainerProvider; +import org.apache.struts2.config.PackageProvider; +import org.apache.struts2.config.RuntimeConfiguration; +import org.apache.struts2.config.entities.PackageConfig; +import org.apache.struts2.config.entities.UnknownHandlerConfig; +import org.apache.struts2.config.providers.StrutsDefaultConfigurationProvider; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.util.location.LocatableProperties; import java.util.HashMap; import java.util.HashSet; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatch.java b/core/src/main/java/org/apache/struts2/config/impl/NamespaceMatch.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatch.java rename to core/src/main/java/org/apache/struts2/config/impl/NamespaceMatch.java index 376ade0f5b..d2ec7da50b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatch.java +++ b/core/src/main/java/org/apache/struts2/config/impl/NamespaceMatch.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; +package org.apache.struts2.config.impl; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatcher.java b/core/src/main/java/org/apache/struts2/config/impl/NamespaceMatcher.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatcher.java rename to core/src/main/java/org/apache/struts2/config/impl/NamespaceMatcher.java index b24fc759a8..f15bf5b000 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatcher.java +++ b/core/src/main/java/org/apache/struts2/config/impl/NamespaceMatcher.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.impl; +package org.apache.struts2.config.impl; -import com.opensymphony.xwork2.util.PatternMatcher; +import org.apache.struts2.util.PatternMatcher; import java.util.Map; import java.util.Set; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/package.html b/core/src/main/java/org/apache/struts2/config/impl/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/config/impl/package.html rename to core/src/main/java/org/apache/struts2/config/impl/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java b/core/src/main/java/org/apache/struts2/config/providers/CycleDetector.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java rename to core/src/main/java/org/apache/struts2/config/providers/CycleDetector.java index b6365411de..affe82cd07 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java +++ b/core/src/main/java/org/apache/struts2/config/providers/CycleDetector.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; +package org.apache.struts2.config.providers; import java.util.ArrayList; import java.util.HashMap; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/DirectedGraph.java b/core/src/main/java/org/apache/struts2/config/providers/DirectedGraph.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/DirectedGraph.java rename to core/src/main/java/org/apache/struts2/config/providers/DirectedGraph.java index 6caacc40e7..b36e47e6f9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/DirectedGraph.java +++ b/core/src/main/java/org/apache/struts2/config/providers/DirectedGraph.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; +package org.apache.struts2.config.providers; import java.util.Collections; import java.util.HashMap; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/EnvsValueSubstitutor.java b/core/src/main/java/org/apache/struts2/config/providers/EnvsValueSubstitutor.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/EnvsValueSubstitutor.java rename to core/src/main/java/org/apache/struts2/config/providers/EnvsValueSubstitutor.java index 9e58fdeba0..50badeeecf 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/EnvsValueSubstitutor.java +++ b/core/src/main/java/org/apache/struts2/config/providers/EnvsValueSubstitutor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; +package org.apache.struts2.config.providers; import org.apache.commons.text.StringSubstitutor; import org.apache.commons.text.lookup.StringLookupFactory; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java b/core/src/main/java/org/apache/struts2/config/providers/InterceptorBuilder.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java rename to core/src/main/java/org/apache/struts2/config/providers/InterceptorBuilder.java index 170e94fc13..72d4f47be6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java +++ b/core/src/main/java/org/apache/struts2/config/providers/InterceptorBuilder.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; - -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.InterceptorConfig; -import com.opensymphony.xwork2.config.entities.InterceptorLocator; -import com.opensymphony.xwork2.config.entities.InterceptorMapping; -import com.opensymphony.xwork2.config.entities.InterceptorStackConfig; -import com.opensymphony.xwork2.interceptor.Interceptor; -import com.opensymphony.xwork2.util.location.Location; +package org.apache.struts2.config.providers; + +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.InterceptorConfig; +import org.apache.struts2.config.entities.InterceptorLocator; +import org.apache.struts2.config.entities.InterceptorMapping; +import org.apache.struts2.config.entities.InterceptorStackConfig; +import org.apache.struts2.interceptor.Interceptor; +import org.apache.struts2.util.location.Location; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/StrutsDefaultConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/providers/StrutsDefaultConfigurationProvider.java similarity index 67% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/StrutsDefaultConfigurationProvider.java rename to core/src/main/java/org/apache/struts2/config/providers/StrutsDefaultConfigurationProvider.java index 6e66dd7a37..31bce4ec3f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/StrutsDefaultConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/providers/StrutsDefaultConfigurationProvider.java @@ -16,55 +16,55 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; - -import com.opensymphony.xwork2.ActionProxyFactory; -import com.opensymphony.xwork2.DefaultActionProxyFactory; -import com.opensymphony.xwork2.DefaultUnknownHandlerManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.UnknownHandlerManager; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.config.impl.DefaultConfiguration; -import com.opensymphony.xwork2.conversion.NullHandler; -import com.opensymphony.xwork2.conversion.impl.ArrayConverter; -import com.opensymphony.xwork2.conversion.impl.CollectionConverter; -import com.opensymphony.xwork2.conversion.impl.DateConverter; -import com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler; -import com.opensymphony.xwork2.conversion.impl.NumberConverter; -import com.opensymphony.xwork2.conversion.impl.StringConverter; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.ognl.ObjectProxy; -import com.opensymphony.xwork2.ognl.OgnlReflectionContextFactory; -import com.opensymphony.xwork2.ognl.accessor.HttpParametersPropertyAccessor; -import com.opensymphony.xwork2.ognl.accessor.ObjectAccessor; -import com.opensymphony.xwork2.ognl.accessor.ObjectProxyPropertyAccessor; -import com.opensymphony.xwork2.ognl.accessor.ParameterPropertyAccessor; -import com.opensymphony.xwork2.ognl.accessor.XWorkCollectionPropertyAccessor; -import com.opensymphony.xwork2.ognl.accessor.XWorkEnumerationAccessor; -import com.opensymphony.xwork2.ognl.accessor.XWorkIteratorPropertyAccessor; -import com.opensymphony.xwork2.ognl.accessor.XWorkListPropertyAccessor; -import com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor; -import com.opensymphony.xwork2.security.AcceptedPatternsChecker; -import com.opensymphony.xwork2.security.DefaultAcceptedPatternsChecker; -import com.opensymphony.xwork2.security.DefaultExcludedPatternsChecker; -import com.opensymphony.xwork2.security.DefaultNotExcludedAcceptedPatternsChecker; -import com.opensymphony.xwork2.security.ExcludedPatternsChecker; -import com.opensymphony.xwork2.security.NotExcludedAcceptedPatternsChecker; -import com.opensymphony.xwork2.util.PatternMatcher; -import com.opensymphony.xwork2.util.WildcardHelper; -import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory; -import com.opensymphony.xwork2.util.location.LocatableProperties; -import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory; -import com.opensymphony.xwork2.validator.ActionValidatorManager; -import com.opensymphony.xwork2.validator.AnnotationActionValidatorManager; -import com.opensymphony.xwork2.validator.DefaultActionValidatorManager; -import com.opensymphony.xwork2.validator.DefaultValidatorFactory; -import com.opensymphony.xwork2.validator.DefaultValidatorFileParser; -import com.opensymphony.xwork2.validator.ValidatorFactory; -import com.opensymphony.xwork2.validator.ValidatorFileParser; +package org.apache.struts2.config.providers; + +import org.apache.struts2.ActionProxyFactory; +import org.apache.struts2.DefaultActionProxyFactory; +import org.apache.struts2.DefaultUnknownHandlerManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.UnknownHandlerManager; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.config.impl.DefaultConfiguration; +import org.apache.struts2.conversion.NullHandler; +import org.apache.struts2.conversion.impl.ArrayConverter; +import org.apache.struts2.conversion.impl.CollectionConverter; +import org.apache.struts2.conversion.impl.DateConverter; +import org.apache.struts2.conversion.impl.InstantiatingNullHandler; +import org.apache.struts2.conversion.impl.NumberConverter; +import org.apache.struts2.conversion.impl.StringConverter; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.ognl.ObjectProxy; +import org.apache.struts2.ognl.OgnlReflectionContextFactory; +import org.apache.struts2.ognl.accessor.HttpParametersPropertyAccessor; +import org.apache.struts2.ognl.accessor.ObjectAccessor; +import org.apache.struts2.ognl.accessor.ObjectProxyPropertyAccessor; +import org.apache.struts2.ognl.accessor.ParameterPropertyAccessor; +import org.apache.struts2.ognl.accessor.XWorkCollectionPropertyAccessor; +import org.apache.struts2.ognl.accessor.XWorkEnumerationAccessor; +import org.apache.struts2.ognl.accessor.XWorkIteratorPropertyAccessor; +import org.apache.struts2.ognl.accessor.XWorkListPropertyAccessor; +import org.apache.struts2.ognl.accessor.XWorkMapPropertyAccessor; +import org.apache.struts2.security.AcceptedPatternsChecker; +import org.apache.struts2.security.DefaultAcceptedPatternsChecker; +import org.apache.struts2.security.DefaultExcludedPatternsChecker; +import org.apache.struts2.security.DefaultNotExcludedAcceptedPatternsChecker; +import org.apache.struts2.security.ExcludedPatternsChecker; +import org.apache.struts2.security.NotExcludedAcceptedPatternsChecker; +import org.apache.struts2.util.PatternMatcher; +import org.apache.struts2.util.WildcardHelper; +import org.apache.struts2.util.fs.DefaultFileManagerFactory; +import org.apache.struts2.util.location.LocatableProperties; +import org.apache.struts2.util.reflection.ReflectionContextFactory; +import org.apache.struts2.validator.ActionValidatorManager; +import org.apache.struts2.validator.AnnotationActionValidatorManager; +import org.apache.struts2.validator.DefaultActionValidatorManager; +import org.apache.struts2.validator.DefaultValidatorFactory; +import org.apache.struts2.validator.DefaultValidatorFileParser; +import org.apache.struts2.validator.ValidatorFactory; +import org.apache.struts2.validator.ValidatorFileParser; import ognl.PropertyAccessor; import org.apache.struts2.dispatcher.HttpParameters; import org.apache.struts2.dispatcher.Parameter; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/ValueSubstitutor.java b/core/src/main/java/org/apache/struts2/config/providers/ValueSubstitutor.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/ValueSubstitutor.java rename to core/src/main/java/org/apache/struts2/config/providers/ValueSubstitutor.java index da6a01d40c..92926697cd 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/ValueSubstitutor.java +++ b/core/src/main/java/org/apache/struts2/config/providers/ValueSubstitutor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; +package org.apache.struts2.config.providers; /** * @since Apache Struts 2.5.6 diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/providers/XmlConfigurationProvider.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java rename to core/src/main/java/org/apache/struts2/config/providers/XmlConfigurationProvider.java index c3c8049c2f..1191f13806 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/providers/XmlConfigurationProvider.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; - -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.ClassPathFinder; -import com.opensymphony.xwork2.util.DomHelper; -import com.opensymphony.xwork2.util.location.LocatableProperties; +package org.apache.struts2.config.providers; + +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.ClassPathFinder; +import org.apache.struts2.util.DomHelper; +import org.apache.struts2.util.location.LocatableProperties; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlDocConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/providers/XmlDocConfigurationProvider.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/XmlDocConfigurationProvider.java rename to core/src/main/java/org/apache/struts2/config/providers/XmlDocConfigurationProvider.java index 87eb2a84aa..2ae13bcce0 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlDocConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/providers/XmlDocConfigurationProvider.java @@ -16,34 +16,34 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; - -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.BeanSelectionProvider; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.config.ConfigurationUtil; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig; -import com.opensymphony.xwork2.config.entities.InterceptorConfig; -import com.opensymphony.xwork2.config.entities.InterceptorMapping; -import com.opensymphony.xwork2.config.entities.InterceptorStackConfig; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.config.entities.ResultTypeConfig; -import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig; -import com.opensymphony.xwork2.config.impl.LocatableFactory; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.inject.Scope; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.DomHelper; -import com.opensymphony.xwork2.util.location.LocatableProperties; -import com.opensymphony.xwork2.util.location.Location; -import com.opensymphony.xwork2.util.location.LocationUtils; +package org.apache.struts2.config.providers; + +import org.apache.struts2.Action; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.BeanSelectionProvider; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.config.ConfigurationUtil; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.ExceptionMappingConfig; +import org.apache.struts2.config.entities.InterceptorConfig; +import org.apache.struts2.config.entities.InterceptorMapping; +import org.apache.struts2.config.entities.InterceptorStackConfig; +import org.apache.struts2.config.entities.PackageConfig; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.config.entities.ResultTypeConfig; +import org.apache.struts2.config.entities.UnknownHandlerConfig; +import org.apache.struts2.config.impl.LocatableFactory; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.inject.Scope; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.DomHelper; +import org.apache.struts2.util.location.LocatableProperties; +import org.apache.struts2.util.location.Location; +import org.apache.struts2.util.location.LocationUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; @@ -66,7 +66,7 @@ import java.util.Set; import java.util.function.Consumer; -import static com.opensymphony.xwork2.util.TextParseUtil.commaDelimitedStringToSet; +import static org.apache.struts2.util.TextParseUtil.commaDelimitedStringToSet; import static java.lang.Boolean.parseBoolean; import static java.lang.Character.isLowerCase; import static java.lang.Character.toUpperCase; @@ -76,7 +76,7 @@ import static org.apache.commons.lang3.StringUtils.trimToNull; /** - * This is a base XWork2 {@link ConfigurationProvider} for loading configuration from a parsed + * This is a base Struts {@link ConfigurationProvider} for loading configuration from a parsed * {@link Document XML document}. By extending this class, configuration can be loaded from any source that an XML * document can be parsed from. Note that this class does not validate the document against any provided DTDs. For * loading configuration from an XML file with DTD validation, please see diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlHelper.java b/core/src/main/java/org/apache/struts2/config/providers/XmlHelper.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/XmlHelper.java rename to core/src/main/java/org/apache/struts2/config/providers/XmlHelper.java index 8f6977f854..6ad3651f41 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlHelper.java +++ b/core/src/main/java/org/apache/struts2/config/providers/XmlHelper.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.config.providers; +package org.apache.struts2.config.providers; import org.apache.commons.lang3.StringUtils; import org.w3c.dom.Document; diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/package.html b/core/src/main/java/org/apache/struts2/config/providers/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/config/providers/package.html rename to core/src/main/java/org/apache/struts2/config/providers/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionAnnotationProcessor.java b/core/src/main/java/org/apache/struts2/conversion/ConversionAnnotationProcessor.java similarity index 86% rename from core/src/main/java/com/opensymphony/xwork2/conversion/ConversionAnnotationProcessor.java rename to core/src/main/java/org/apache/struts2/conversion/ConversionAnnotationProcessor.java index 9daa28b129..13f2287023 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionAnnotationProcessor.java +++ b/core/src/main/java/org/apache/struts2/conversion/ConversionAnnotationProcessor.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; -import com.opensymphony.xwork2.conversion.annotations.TypeConversion; +import org.apache.struts2.conversion.annotations.TypeConversion; import java.util.Map; /** - * Used to process {@link com.opensymphony.xwork2.conversion.annotations.TypeConversion} + * Used to process {@link TypeConversion} * annotation to read defined Converters */ public interface ConversionAnnotationProcessor { diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionFileProcessor.java b/core/src/main/java/org/apache/struts2/conversion/ConversionFileProcessor.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/conversion/ConversionFileProcessor.java rename to core/src/main/java/org/apache/struts2/conversion/ConversionFileProcessor.java index f16a9eb70d..5fe2063e76 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionFileProcessor.java +++ b/core/src/main/java/org/apache/struts2/conversion/ConversionFileProcessor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java b/core/src/main/java/org/apache/struts2/conversion/ConversionPropertiesProcessor.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java rename to core/src/main/java/org/apache/struts2/conversion/ConversionPropertiesProcessor.java index 5fc6dd2065..b6848744c5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionPropertiesProcessor.java +++ b/core/src/main/java/org/apache/struts2/conversion/ConversionPropertiesProcessor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; /** * Used to read converters from Properties file diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/NullHandler.java b/core/src/main/java/org/apache/struts2/conversion/NullHandler.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/conversion/NullHandler.java rename to core/src/main/java/org/apache/struts2/conversion/NullHandler.java index 01cbec76bd..2eb2ed06fc 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/NullHandler.java +++ b/core/src/main/java/org/apache/struts2/conversion/NullHandler.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; import java.util.Map; @@ -42,7 +42,7 @@ public interface NullHandler * @return object */ Object nullMethodResult(Map context, Object target, String methodName, Object[] args); - + /** * Property in target evaluated to null. Property can be a constant * String property name or a DynamicSubscript. diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/ObjectTypeDeterminer.java b/core/src/main/java/org/apache/struts2/conversion/ObjectTypeDeterminer.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/conversion/ObjectTypeDeterminer.java rename to core/src/main/java/org/apache/struts2/conversion/ObjectTypeDeterminer.java index 852b33043a..d43e45e047 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/ObjectTypeDeterminer.java +++ b/core/src/main/java/org/apache/struts2/conversion/ObjectTypeDeterminer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; /** * Determines what the key and and element class of a Map or Collection should be. For Maps, the elements are the diff --git a/core/src/main/java/org/apache/struts2/conversion/StrutsConversionPropertiesProcessor.java b/core/src/main/java/org/apache/struts2/conversion/StrutsConversionPropertiesProcessor.java index 0f509dfb47..df4ca6972b 100644 --- a/core/src/main/java/org/apache/struts2/conversion/StrutsConversionPropertiesProcessor.java +++ b/core/src/main/java/org/apache/struts2/conversion/StrutsConversionPropertiesProcessor.java @@ -18,13 +18,9 @@ */ package org.apache.struts2.conversion; -import com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.conversion.TypeConverterCreator; -import com.opensymphony.xwork2.conversion.TypeConverterHolder; -import com.opensymphony.xwork2.inject.EarlyInitializable; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.inject.EarlyInitializable; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterCreator.java b/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterCreator.java index eee8ff7df5..443f2ff5a5 100644 --- a/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterCreator.java +++ b/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterCreator.java @@ -18,10 +18,8 @@ */ package org.apache.struts2.conversion; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.conversion.TypeConverterCreator; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.inject.Inject; /** * Default implementation of {@link TypeConverterCreator} diff --git a/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterHolder.java b/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterHolder.java index c904f3676a..3013c3bd47 100644 --- a/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterHolder.java +++ b/core/src/main/java/org/apache/struts2/conversion/StrutsTypeConverterHolder.java @@ -18,9 +18,6 @@ */ package org.apache.struts2.conversion; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.conversion.TypeConverterHolder; - import java.util.HashMap; import java.util.HashSet; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverter.java b/core/src/main/java/org/apache/struts2/conversion/TypeConverter.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverter.java rename to core/src/main/java/org/apache/struts2/conversion/TypeConverter.java index 98725e95a5..322d70436d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/TypeConverter.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; import java.lang.reflect.Member; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverterCreator.java b/core/src/main/java/org/apache/struts2/conversion/TypeConverterCreator.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverterCreator.java rename to core/src/main/java/org/apache/struts2/conversion/TypeConverterCreator.java index 57151bc9f3..88a18b8924 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverterCreator.java +++ b/core/src/main/java/org/apache/struts2/conversion/TypeConverterCreator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; /** * Instantiate converter classes, if cannot create TypeConverter throws exception diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverterHolder.java b/core/src/main/java/org/apache/struts2/conversion/TypeConverterHolder.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverterHolder.java rename to core/src/main/java/org/apache/struts2/conversion/TypeConverterHolder.java index d58b65ae83..d20324719d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/TypeConverterHolder.java +++ b/core/src/main/java/org/apache/struts2/conversion/TypeConverterHolder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion; +package org.apache.struts2.conversion; import java.util.Map; diff --git a/core/src/main/java/org/apache/struts2/conversion/UploadedFileConverter.java b/core/src/main/java/org/apache/struts2/conversion/UploadedFileConverter.java index c57a3ef9c7..6549e8bf34 100644 --- a/core/src/main/java/org/apache/struts2/conversion/UploadedFileConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/UploadedFileConverter.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.conversion; -import com.opensymphony.xwork2.conversion.impl.DefaultTypeConverter; +import org.apache.struts2.conversion.impl.DefaultTypeConverter; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.dispatcher.multipart.UploadedFile; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/Conversion.java b/core/src/main/java/org/apache/struts2/conversion/annotations/Conversion.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/conversion/annotations/Conversion.java rename to core/src/main/java/org/apache/struts2/conversion/annotations/Conversion.java index 3e8b173439..4f25b18ad7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/Conversion.java +++ b/core/src/main/java/org/apache/struts2/conversion/annotations/Conversion.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.annotations; +package org.apache.struts2.conversion.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/ConversionRule.java b/core/src/main/java/org/apache/struts2/conversion/annotations/ConversionRule.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/conversion/annotations/ConversionRule.java rename to core/src/main/java/org/apache/struts2/conversion/annotations/ConversionRule.java index 8a5e1785d5..fa75f69e46 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/ConversionRule.java +++ b/core/src/main/java/org/apache/struts2/conversion/annotations/ConversionRule.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.annotations; +package org.apache.struts2.conversion.annotations; /** * ConversionRule diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/ConversionType.java b/core/src/main/java/org/apache/struts2/conversion/annotations/ConversionType.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/conversion/annotations/ConversionType.java rename to core/src/main/java/org/apache/struts2/conversion/annotations/ConversionType.java index 7f219ee8ab..cff08a7863 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/ConversionType.java +++ b/core/src/main/java/org/apache/struts2/conversion/annotations/ConversionType.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.annotations; +package org.apache.struts2.conversion.annotations; /** * ConversionType diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/TypeConversion.java b/core/src/main/java/org/apache/struts2/conversion/annotations/TypeConversion.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/conversion/annotations/TypeConversion.java rename to core/src/main/java/org/apache/struts2/conversion/annotations/TypeConversion.java index eda8a585a2..a28d8c9873 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/TypeConversion.java +++ b/core/src/main/java/org/apache/struts2/conversion/annotations/TypeConversion.java @@ -16,9 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.annotations; +package org.apache.struts2.conversion.annotations; -import com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter; +import org.apache.struts2.conversion.impl.XWorkBasicConverter; +import org.apache.struts2.conversion.impl.DefaultObjectTypeDeterminer; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -173,9 +174,9 @@ /** * The ConversionRule can be a PROPERTY, KEY, KEY_PROPERTY, ELEMENT, COLLECTION (deprecated) or a MAP. - * Note: Collection and Map conversion rules can be determined via com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer. + * Note: Collection and Map conversion rules can be determined via org.apache.struts2.util.DefaultObjectTypeDeterminer. * - * @see com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer + * @see DefaultObjectTypeDeterminer * * @return the conversion rule */ diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/package.html b/core/src/main/java/org/apache/struts2/conversion/annotations/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/conversion/annotations/package.html rename to core/src/main/java/org/apache/struts2/conversion/annotations/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/ArrayConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/ArrayConverter.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/ArrayConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/ArrayConverter.java index 3de49878e3..e21ad34823 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/ArrayConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/ArrayConverter.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverter; import java.lang.reflect.Array; import java.lang.reflect.Member; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/CollectionConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/CollectionConverter.java similarity index 89% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/CollectionConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/CollectionConverter.java index b7f707f404..815380927b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/CollectionConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/CollectionConverter.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.inject.Inject; import java.lang.reflect.Member; import java.util.Collection; @@ -61,7 +61,7 @@ public Object convertValue(Map context, Object target, Member me for (Object anObjArray : objArray) { Object convertedValue = converter.convertValue(context, target, member, propertyName, anObjArray, memberType); - if (!TypeConverter.NO_CONVERSION_POSSIBLE.equals(convertedValue)) { + if (!NO_CONVERSION_POSSIBLE.equals(convertedValue)) { result.add(convertedValue); } } @@ -72,7 +72,7 @@ public Object convertValue(Map context, Object target, Member me for (Object aCol : col) { Object convertedValue = converter.convertValue(context, target, member, propertyName, aCol, memberType); - if (!TypeConverter.NO_CONVERSION_POSSIBLE.equals(convertedValue)) { + if (!NO_CONVERSION_POSSIBLE.equals(convertedValue)) { result.add(convertedValue); } } @@ -80,7 +80,7 @@ public Object convertValue(Map context, Object target, Member me result = createCollection(toType, memberType, -1); TypeConverter converter = getTypeConverter(context); Object convertedValue = converter.convertValue(context, target, member, propertyName, value, memberType); - if (!TypeConverter.NO_CONVERSION_POSSIBLE.equals(convertedValue)) { + if (!NO_CONVERSION_POSSIBLE.equals(convertedValue)) { result.add(convertedValue); } } diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/ConversionData.java b/core/src/main/java/org/apache/struts2/conversion/impl/ConversionData.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/ConversionData.java rename to core/src/main/java/org/apache/struts2/conversion/impl/ConversionData.java index 2c3dd5d5f2..40eedb9a87 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/ConversionData.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/ConversionData.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; public class ConversionData { private Object value; @@ -34,12 +34,15 @@ public ConversionData(Object value, Class toClass) { public Object getValue() { return value; } + public void setValue(Object value) { this.value = value; } + public Class getToClass() { return toClass; } + public void setToClass(Class toClass) { this.toClass = toClass; } diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/DateConverter.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/DateConverter.java index 298381b162..6d89be2847 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/DateConverter.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.TextProvider; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.conversion.TypeConversionException; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultConversionAnnotationProcessor.java similarity index 88% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java rename to core/src/main/java/org/apache/struts2/conversion/impl/DefaultConversionAnnotationProcessor.java index 8021f3f92e..fcf2d727d3 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionAnnotationProcessor.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultConversionAnnotationProcessor.java @@ -16,17 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.conversion.TypeConverterCreator; -import com.opensymphony.xwork2.conversion.TypeConverterHolder; -import com.opensymphony.xwork2.conversion.annotations.ConversionRule; -import com.opensymphony.xwork2.conversion.annotations.ConversionType; -import com.opensymphony.xwork2.conversion.annotations.TypeConversion; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.conversion.ConversionAnnotationProcessor; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverterCreator; +import org.apache.struts2.conversion.TypeConverterHolder; +import org.apache.struts2.conversion.annotations.ConversionRule; +import org.apache.struts2.conversion.annotations.ConversionType; +import org.apache.struts2.conversion.annotations.TypeConversion; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultConversionFileProcessor.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java rename to core/src/main/java/org/apache/struts2/conversion/impl/DefaultConversionFileProcessor.java index 7995b7dc33..24db040b4f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultConversionFileProcessor.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultConversionFileProcessor.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.conversion.ConversionFileProcessor; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.conversion.TypeConverterCreator; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.conversion.ConversionFileProcessor; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverterCreator; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultObjectTypeDeterminer.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java rename to core/src/main/java/org/apache/struts2/conversion/impl/DefaultObjectTypeDeterminer.java index 62d902355a..db56ae0754 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultObjectTypeDeterminer.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.CreateIfNull; -import com.opensymphony.xwork2.util.Element; -import com.opensymphony.xwork2.util.Key; -import com.opensymphony.xwork2.util.KeyProperty; -import com.opensymphony.xwork2.util.reflection.ReflectionException; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.CreateIfNull; +import org.apache.struts2.util.Element; +import org.apache.struts2.util.Key; +import org.apache.struts2.util.KeyProperty; +import org.apache.struts2.util.reflection.ReflectionException; +import org.apache.struts2.util.reflection.ReflectionProvider; import org.apache.commons.lang3.BooleanUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -82,7 +82,7 @@ public DefaultObjectTypeDeterminer(@Inject XWorkConverter converter, @Inject Ref * * @param parentClass the Class which contains as a property the Map or Collection we are finding the key for. * @param property the property of the Map or Collection for the given parent class - * @see com.opensymphony.xwork2.conversion.ObjectTypeDeterminer#getKeyClass(Class, String) + * @see ObjectTypeDeterminer#getKeyClass(Class, String) */ public Class getKeyClass(Class parentClass, String property) { Key annotation = getAnnotation(parentClass, property, Key.class); @@ -106,7 +106,7 @@ public Class getKeyClass(Class parentClass, String property) { * * @param parentClass the Class which contains as a property the Map or Collection we are finding the key for. * @param property the property of the Map or Collection for the given parent class - * @see com.opensymphony.xwork2.conversion.ObjectTypeDeterminer#getElementClass(Class, String, Object) + * @see ObjectTypeDeterminer#getElementClass(Class, String, Object) */ public Class getElementClass(Class parentClass, String property, Object key) { Element annotation = getAnnotation(parentClass, property, Element.class); @@ -135,7 +135,7 @@ public Class getElementClass(Class parentClass, String property, Object key) { * * @param parentClass the Class which contains as a property the Map or Collection we are finding the key for. * @param property the property of the Map or Collection for the given parent class - * @see com.opensymphony.xwork2.conversion.ObjectTypeDeterminer#getKeyProperty(Class, String) + * @see ObjectTypeDeterminer#getKeyProperty(Class, String) */ public String getKeyProperty(Class parentClass, String property) { KeyProperty annotation = getAnnotation(parentClass, property, KeyProperty.class); diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultTypeConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultTypeConverter.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultTypeConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/DefaultTypeConverter.java index fb9d91cd60..a6ebef0a2e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultTypeConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/DefaultTypeConverter.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.XWorkTypeConverterWrapper; +import org.apache.struts2.ActionContext; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.XWorkTypeConverterWrapper; import ognl.OgnlContext; import java.lang.reflect.Array; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java b/core/src/main/java/org/apache/struts2/conversion/impl/InstantiatingNullHandler.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java rename to core/src/main/java/org/apache/struts2/conversion/impl/InstantiatingNullHandler.java index e7cc1713b4..52ebdd836c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/InstantiatingNullHandler.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; - -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.conversion.NullHandler; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +package org.apache.struts2.conversion.impl; + +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.conversion.NullHandler; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.reflection.ReflectionContextState; +import org.apache.struts2.util.reflection.ReflectionProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/NumberConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/NumberConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java index f1b03ad5fa..8a1da51239 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/NumberConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/StringConverter.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/StringConverter.java index e0f7d4bb23..807c82f87c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/StringConverter.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/XWorkBasicConverter.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/XWorkBasicConverter.java index c02b5ce61a..c270a4bcdb 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/XWorkBasicConverter.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import org.apache.struts2.StrutsConstants; import org.apache.struts2.conversion.TypeConversionException; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java b/core/src/main/java/org/apache/struts2/conversion/impl/XWorkConverter.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java rename to core/src/main/java/org/apache/struts2/conversion/impl/XWorkConverter.java index cdad25991a..507f765d07 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/XWorkConverter.java @@ -16,24 +16,24 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor; -import com.opensymphony.xwork2.conversion.ConversionFileProcessor; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.conversion.TypeConverterHolder; -import com.opensymphony.xwork2.conversion.annotations.Conversion; -import com.opensymphony.xwork2.conversion.annotations.TypeConversion; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.AnnotationUtils; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +package org.apache.struts2.conversion.impl; + +import org.apache.struts2.ActionContext; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.LocalizedTextProvider; +import org.apache.struts2.conversion.ConversionAnnotationProcessor; +import org.apache.struts2.conversion.ConversionFileProcessor; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverterHolder; +import org.apache.struts2.conversion.annotations.Conversion; +import org.apache.struts2.conversion.annotations.TypeConversion; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.AnnotationUtils; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.CompoundRoot; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.reflection.ReflectionContextState; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkList.java b/core/src/main/java/org/apache/struts2/conversion/impl/XWorkList.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkList.java rename to core/src/main/java/org/apache/struts2/conversion/impl/XWorkList.java index ee5093ed47..2850cbe39d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkList.java +++ b/core/src/main/java/org/apache/struts2/conversion/impl/XWorkList.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.conversion.impl; +package org.apache.struts2.conversion.impl; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.conversion.TypeConverter; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.conversion.TypeConverter; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/ContainerHolder.java b/core/src/main/java/org/apache/struts2/dispatcher/ContainerHolder.java index 2d1c61657e..5e0b0ceb17 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/ContainerHolder.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/ContainerHolder.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.inject.Container; +import org.apache.struts2.inject.Container; /** * Simple class to hold Container instance per thread to minimise number of attempts diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultActionSupport.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultActionSupport.java index 12828a0062..4b223f6dfc 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultActionSupport.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultActionSupport.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; import jakarta.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; import org.apache.struts2.interceptor.parameter.StrutsParameter; @@ -44,7 +44,7 @@ public DefaultActionSupport() { } /* (non-Javadoc) - * @see com.opensymphony.xwork2.ActionSupport#execute() + * @see org.apache.struts2.ActionSupport#execute() */ @Override public String execute() throws Exception { diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java index 00cc4ff100..d643458541 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.location.Location; -import com.opensymphony.xwork2.util.location.LocationUtils; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.location.Location; +import org.apache.struts2.util.location.LocationUtils; import freemarker.template.Template; import jakarta.servlet.RequestDispatcher; import jakarta.servlet.ServletContext; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java index be8b18df40..18f4c54dd5 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.BooleanUtils; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java index 4033a42b71..b7583f6e6b 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java @@ -18,36 +18,36 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.ActionProxyFactory; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.config.FileManagerFactoryProvider; -import com.opensymphony.xwork2.config.FileManagerProvider; -import com.opensymphony.xwork2.config.ServletContextAwareConfigurationProvider; -import com.opensymphony.xwork2.config.entities.InterceptorMapping; -import com.opensymphony.xwork2.config.entities.InterceptorStackConfig; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.Interceptor; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.location.LocatableProperties; -import com.opensymphony.xwork2.util.location.Location; -import com.opensymphony.xwork2.util.location.LocationUtils; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.ActionProxyFactory; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.Result; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.config.FileManagerFactoryProvider; +import org.apache.struts2.config.FileManagerProvider; +import org.apache.struts2.config.ServletContextAwareConfigurationProvider; +import org.apache.struts2.config.entities.InterceptorMapping; +import org.apache.struts2.config.entities.InterceptorStackConfig; +import org.apache.struts2.config.entities.PackageConfig; +import org.apache.struts2.config.providers.XmlConfigurationProvider; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.Interceptor; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; +import org.apache.struts2.util.location.LocatableProperties; +import org.apache.struts2.util.location.Location; +import org.apache.struts2.util.location.LocationUtils; import jakarta.servlet.ServletContext; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/InitOperations.java b/core/src/main/java/org/apache/struts2/dispatcher/InitOperations.java index 6f37a6392e..7c849edb7d 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/InitOperations.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/InitOperations.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.ActionContext; +import org.apache.struts2.ActionContext; import java.util.HashMap; import java.util.Iterator; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/MockDispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/MockDispatcher.java index 65b8128775..d6a101d9ea 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/MockDispatcher.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/MockDispatcher.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.config.ConfigurationManager; +import org.apache.struts2.config.ConfigurationManager; import jakarta.servlet.ServletContext; import java.util.Map; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/PrepareOperations.java b/core/src/main/java/org/apache/struts2/dispatcher/PrepareOperations.java index 142e6414b5..09df2c15f3 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/PrepareOperations.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/PrepareOperations.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/StrutsRequestWrapper.java b/core/src/main/java/org/apache/struts2/dispatcher/StrutsRequestWrapper.java index 69033dd9c5..416bf89d6e 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/StrutsRequestWrapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/StrutsRequestWrapper.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.dispatcher; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequestWrapper; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java index dd81a463ff..cdd1760cfa 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher.mapper; -import com.opensymphony.xwork2.config.ConfigurationManager; +import org.apache.struts2.config.ConfigurationManager; import jakarta.servlet.http.HttpServletRequest; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java index 1d9bde5f1e..6414d3922c 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher.mapper; -import com.opensymphony.xwork2.Result; +import org.apache.struts2.Result; import java.util.HashMap; import java.util.Map; @@ -108,7 +108,7 @@ public String getMethod() { public Result getResult() { return result; } - + /** * @return The extension used during this request */ @@ -150,7 +150,7 @@ public void setMethod(String method) { public void setParams(Map params) { this.params = params; } - + /** * @param extension The extension used in the request */ diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java index 90960a342f..f1e59eab92 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.dispatcher.mapper; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java index 53797f5cf3..6e0f57c8b9 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java @@ -18,13 +18,13 @@ */ package org.apache.struts2.dispatcher.mapper; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.ActionContext; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.PackageConfig; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java index 4ca0665758..a7126e80a6 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.dispatcher.mapper; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java index a2d1569c6d..988c23943c 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.dispatcher.mapper; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java b/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java index 2af648b7ee..d93d45e98f 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.dispatcher.mapper; -import com.opensymphony.xwork2.config.ConfigurationManager; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.ConfigurationManager; +import org.apache.struts2.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java index 94ce2122d6..ccb25e0535 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher.multipart; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import org.apache.commons.fileupload2.core.FileUploadByteCountLimitException; import org.apache.commons.fileupload2.core.FileUploadContentTypeException; diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java index 532a5e45a0..6f5afe3490 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.dispatcher.multipart; -import com.opensymphony.xwork2.LocaleProvider; +import org.apache.struts2.LocaleProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.dispatcher.LocalizedMessage; diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java b/core/src/main/java/org/apache/struts2/factory/ActionFactory.java similarity index 88% rename from core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java rename to core/src/main/java/org/apache/struts2/factory/ActionFactory.java index 15a0f780f3..1eb9dc3039 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/ActionFactory.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.ActionConfig; import java.util.Map; /** - * Used by {@link com.opensymphony.xwork2.ObjectFactory} to build actions + * Used by {@link org.apache.struts2.ObjectFactory} to build actions */ public interface ActionFactory { diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java b/core/src/main/java/org/apache/struts2/factory/ConverterFactory.java similarity index 82% rename from core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java rename to core/src/main/java/org/apache/struts2/factory/ConverterFactory.java index 00610ea9e2..a0c9cf6125 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/ConverterFactory.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverter; import java.util.Map; /** - * Dedicated interface used by {@link com.opensymphony.xwork2.ObjectFactory} to build {@link TypeConverter} + * Dedicated interface used by {@link org.apache.struts2.ObjectFactory} to build {@link TypeConverter} */ public interface ConverterFactory { @@ -31,7 +31,7 @@ public interface ConverterFactory { * Build converter of given type * * @param converterClass to instantiate - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * * @return instance of converterClass with inject dependencies * diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultActionFactory.java b/core/src/main/java/org/apache/struts2/factory/DefaultActionFactory.java similarity index 87% rename from core/src/main/java/com/opensymphony/xwork2/factory/DefaultActionFactory.java rename to core/src/main/java/org/apache/struts2/factory/DefaultActionFactory.java index 44c036ce48..15d4555372 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultActionFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/DefaultActionFactory.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.inject.Inject; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultInterceptorFactory.java b/core/src/main/java/org/apache/struts2/factory/DefaultInterceptorFactory.java similarity index 79% rename from core/src/main/java/com/opensymphony/xwork2/factory/DefaultInterceptorFactory.java rename to core/src/main/java/org/apache/struts2/factory/DefaultInterceptorFactory.java index a3304a1361..77b68e4876 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultInterceptorFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/DefaultInterceptorFactory.java @@ -16,17 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.InterceptorConfig; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.Interceptor; -import com.opensymphony.xwork2.interceptor.WithLazyParams; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.InterceptorConfig; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.Interceptor; +import org.apache.struts2.interceptor.WithLazyParams; +import org.apache.struts2.util.reflection.ReflectionProvider; import java.util.HashMap; import java.util.Map; @@ -63,23 +63,18 @@ public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map extraContext) throws Exception { + String resultClassName = resultConfig.getClassName(); + if (resultClassName == null) { + return null; + } + + Object o = objectFactory.buildBean(resultClassName, extraContext); + + if (!(o instanceof Result result)) { + throw new ConfigurationException("Class [" + resultClassName + "] does not implement Result", resultConfig); + } + + Map params = resultConfig.getParams(); + if (params != null) { + for (Map.Entry paramEntry : params.entrySet()) { + try { + reflectionProvider.setProperty(paramEntry.getKey(), paramEntry.getValue(), result, extraContext, true); + } catch (ReflectionException ex) { + if (result instanceof ReflectionExceptionHandler reflectionExceptionHandler) { + reflectionExceptionHandler.handle(ex); + } + } + } + } + + return result; + } + +} diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultUnknownHandlerFactory.java b/core/src/main/java/org/apache/struts2/factory/DefaultUnknownHandlerFactory.java similarity index 87% rename from core/src/main/java/com/opensymphony/xwork2/factory/DefaultUnknownHandlerFactory.java rename to core/src/main/java/org/apache/struts2/factory/DefaultUnknownHandlerFactory.java index 4fe37f790a..a504a73c42 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultUnknownHandlerFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/DefaultUnknownHandlerFactory.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.UnknownHandler; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.UnknownHandler; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultValidatorFactory.java b/core/src/main/java/org/apache/struts2/factory/DefaultValidatorFactory.java similarity index 86% rename from core/src/main/java/com/opensymphony/xwork2/factory/DefaultValidatorFactory.java rename to core/src/main/java/org/apache/struts2/factory/DefaultValidatorFactory.java index 6da7dea75c..d781e72ad0 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/DefaultValidatorFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/DefaultValidatorFactory.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; -import com.opensymphony.xwork2.validator.Validator; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.reflection.ReflectionProvider; +import org.apache.struts2.validator.Validator; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java b/core/src/main/java/org/apache/struts2/factory/InterceptorFactory.java similarity index 83% rename from core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java rename to core/src/main/java/org/apache/struts2/factory/InterceptorFactory.java index 979e9a5235..053f91ce49 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/InterceptorFactory.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.InterceptorConfig; -import com.opensymphony.xwork2.interceptor.Interceptor; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.InterceptorConfig; +import org.apache.struts2.interceptor.Interceptor; import java.util.Map; /** - * Dedicated interface used by {@link com.opensymphony.xwork2.ObjectFactory} to build {@link com.opensymphony.xwork2.interceptor.Interceptor} + * Dedicated interface used by {@link org.apache.struts2.ObjectFactory} to build {@link org.apache.struts2.interceptor.Interceptor} */ public interface InterceptorFactory { diff --git a/core/src/main/java/org/apache/struts2/factory/PrefixBasedActionProxyFactory.java b/core/src/main/java/org/apache/struts2/factory/PrefixBasedActionProxyFactory.java index 7b6133a5fe..8c77d175d0 100644 --- a/core/src/main/java/org/apache/struts2/factory/PrefixBasedActionProxyFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/PrefixBasedActionProxyFactory.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.factory; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.ActionProxyFactory; -import com.opensymphony.xwork2.inject.Initializable; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.ActionProxyFactory; +import org.apache.struts2.inject.Initializable; +import org.apache.struts2.inject.Inject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsConstants; @@ -35,7 +35,7 @@ * *

    * Prefix based factory should be used with {@link org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper} - * to use appropriate {@link com.opensymphony.xwork2.ActionProxyFactory} connected with given + * to use appropriate {@link org.apache.struts2.ActionProxyFactory} connected with given * {@link org.apache.struts2.dispatcher.mapper.ActionMapper} *

    * diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ResultFactory.java b/core/src/main/java/org/apache/struts2/factory/ResultFactory.java similarity index 79% rename from core/src/main/java/com/opensymphony/xwork2/factory/ResultFactory.java rename to core/src/main/java/org/apache/struts2/factory/ResultFactory.java index b965bf8bd1..52df10c910 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/ResultFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/ResultFactory.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.config.entities.ResultConfig; +import org.apache.struts2.Result; +import org.apache.struts2.config.entities.ResultConfig; import java.util.Map; /** - * Used by {@link com.opensymphony.xwork2.ObjectFactory} to build {@link com.opensymphony.xwork2.Result} + * Used by {@link org.apache.struts2.ObjectFactory} to build {@link org.apache.struts2.Result} */ public interface ResultFactory { diff --git a/core/src/main/java/org/apache/struts2/factory/StrutsActionProxy.java b/core/src/main/java/org/apache/struts2/factory/StrutsActionProxy.java index c7542b6aba..dbf2f3a9b8 100644 --- a/core/src/main/java/org/apache/struts2/factory/StrutsActionProxy.java +++ b/core/src/main/java/org/apache/struts2/factory/StrutsActionProxy.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.factory; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.DefaultActionProxy; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.DefaultActionProxy; import org.apache.struts2.ServletActionContext; import java.io.Serial; diff --git a/core/src/main/java/org/apache/struts2/factory/StrutsActionProxyFactory.java b/core/src/main/java/org/apache/struts2/factory/StrutsActionProxyFactory.java index 2b32baa180..0a5cbf5aa5 100644 --- a/core/src/main/java/org/apache/struts2/factory/StrutsActionProxyFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/StrutsActionProxyFactory.java @@ -18,15 +18,15 @@ */ package org.apache.struts2.factory; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.DefaultActionProxyFactory; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.DefaultActionProxyFactory; public class StrutsActionProxyFactory extends DefaultActionProxyFactory { @Override public ActionProxy createActionProxy(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext) { - + StrutsActionProxy proxy = new StrutsActionProxy(inv, namespace, actionName, methodName, executeResult, cleanupContext); container.inject(proxy); proxy.prepare(); diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/StrutsConverterFactory.java b/core/src/main/java/org/apache/struts2/factory/StrutsConverterFactory.java similarity index 88% rename from core/src/main/java/com/opensymphony/xwork2/factory/StrutsConverterFactory.java rename to core/src/main/java/org/apache/struts2/factory/StrutsConverterFactory.java index 2c873e60b1..ef36df6e94 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/StrutsConverterFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/StrutsConverterFactory.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.conversion.TypeConverter; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.conversion.TypeConverter; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java b/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java index 8979af0b76..3aceaead0a 100644 --- a/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/StrutsResultFactory.java @@ -18,21 +18,20 @@ */ package org.apache.struts2.factory; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.factory.ResultFactory; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.result.ParamNameAwareResult; -import com.opensymphony.xwork2.util.reflection.ReflectionException; -import com.opensymphony.xwork2.util.reflection.ReflectionExceptionHandler; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.Result; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.result.ParamNameAwareResult; +import org.apache.struts2.util.reflection.ReflectionException; +import org.apache.struts2.util.reflection.ReflectionExceptionHandler; +import org.apache.struts2.util.reflection.ReflectionProvider; import java.util.Map; /** - * Default implementation which uses {@link com.opensymphony.xwork2.result.ParamNameAwareResult} to accept or throw away parameters + * Default implementation which uses {@link ParamNameAwareResult} to accept or throw away parameters */ public class StrutsResultFactory implements ResultFactory { @@ -52,71 +51,41 @@ public void setReflectionProvider(ReflectionProvider provider) { @Override public Result buildResult(ResultConfig resultConfig, Map extraContext) throws Exception { String resultClassName = resultConfig.getClassName(); - Result result = null; - if (resultClassName != null) { - Object o = objectFactory.buildBean(resultClassName, extraContext); - Map params = resultConfig.getParams(); - if (params != null) { - setParameters(extraContext, o, params); - } - if (o instanceof Result) { - result = (Result) o; - } else if (o instanceof org.apache.struts2.Result) { - result = Result.adapt((org.apache.struts2.Result) o); - } - if (result == null) { - throw new ConfigurationException("Class [" + resultClassName + "] does not implement Result", resultConfig); - } + if (resultClassName == null) { + return null; } - return result; - } - protected void setParameters(Map extraContext, Result result, Map params) { - setParametersHelper(extraContext, result, params); - } - - protected void setParameters(Map extraContext, Object result, Map params) { - if (result instanceof Result) { - setParameters(extraContext, (Result) result, params); - } else { - setParametersHelper(extraContext, result, params); + Object o = objectFactory.buildBean(resultClassName, extraContext); + if (!(o instanceof Result result)) { + throw new ConfigurationException("Class [" + resultClassName + "] does not implement Result", resultConfig); } + Map params = resultConfig.getParams(); + if (params != null) { + setParameters(extraContext, result, params); + } + + return result; } - private void setParametersHelper(Map extraContext, Object result, Map params) { + protected void setParameters(Map extraContext, Result result, Map params) { for (Map.Entry paramEntry : params.entrySet()) { try { String name = paramEntry.getKey(); String value = paramEntry.getValue(); setParameter(result, name, value, extraContext); } catch (ReflectionException ex) { - if (result instanceof ReflectionExceptionHandler) { - ((ReflectionExceptionHandler) result).handle(ex); + if (result instanceof ReflectionExceptionHandler reflectionExceptionHandler) { + reflectionExceptionHandler.handle(ex); } } } } protected void setParameter(Result result, String name, String value, Map extraContext) { - setParameterHelper(result, name, value, extraContext); - } - - private void setParameter(Object result, String name, String value, Map extraContext) { - if (result instanceof Result) { - setParameter((Result) result, name, value, extraContext); - } else { - setParameterHelper(result, name, value, extraContext); - } - } - - private void setParameterHelper(Object result, String name, String value, Map extraContext) { - if (result instanceof ParamNameAwareResult) { - if (((ParamNameAwareResult) result).acceptableParameterName(name, value)) { - reflectionProvider.setProperty(name, value, result, extraContext, true); - } - } else { + if (!(result instanceof ParamNameAwareResult paramNameAwareResult) || paramNameAwareResult.acceptableParameterName(name, value)) { reflectionProvider.setProperty(name, value, result, extraContext, true); } } + } diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java b/core/src/main/java/org/apache/struts2/factory/UnknownHandlerFactory.java similarity index 79% rename from core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java rename to core/src/main/java/org/apache/struts2/factory/UnknownHandlerFactory.java index 07deb682af..11ce9dbc9b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/UnknownHandlerFactory.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.UnknownHandler; +import org.apache.struts2.UnknownHandler; import java.util.Map; /** - * Dedicated interface used by {@link com.opensymphony.xwork2.ObjectFactory} to build {@link com.opensymphony.xwork2.UnknownHandler} + * Dedicated interface used by {@link org.apache.struts2.ObjectFactory} to build {@link org.apache.struts2.UnknownHandler} */ public interface UnknownHandlerFactory { @@ -33,7 +33,7 @@ public interface UnknownHandlerFactory { * @param unknownHandlerName name of unknown handler defined in struts.xml * @param extraContext extra params * - * @return instance of {@link com.opensymphony.xwork2.UnknownHandler} with injected dependencies + * @return instance of {@link org.apache.struts2.UnknownHandler} with injected dependencies * * @throws Exception in case of any errors */ diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java b/core/src/main/java/org/apache/struts2/factory/ValidatorFactory.java similarity index 84% rename from core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java rename to core/src/main/java/org/apache/struts2/factory/ValidatorFactory.java index 51dc0fee0f..3660de5dc2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java +++ b/core/src/main/java/org/apache/struts2/factory/ValidatorFactory.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.factory; +package org.apache.struts2.factory; -import com.opensymphony.xwork2.validator.Validator; +import org.apache.struts2.validator.Validator; import java.util.Map; /** - * Dedicated interface used by {@link com.opensymphony.xwork2.ObjectFactory} to build {@link Validator} + * Dedicated interface used by {@link org.apache.struts2.ObjectFactory} to build {@link Validator} */ public interface ValidatorFactory { @@ -32,7 +32,7 @@ public interface ValidatorFactory { * * @param className the type of Validator to build * @param params property name -> value Map to set onto the Validator instance - * @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext} + * @param extraContext a Map of extra context which uses the same keys as the {@link org.apache.struts2.ActionContext} * * @return a validator instance * diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/ConstructionContext.java b/core/src/main/java/org/apache/struts2/inject/ConstructionContext.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/inject/ConstructionContext.java rename to core/src/main/java/org/apache/struts2/inject/ConstructionContext.java index 5975e9561e..e2df08ed12 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/ConstructionContext.java +++ b/core/src/main/java/org/apache/struts2/inject/ConstructionContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Container.java b/core/src/main/java/org/apache/struts2/inject/Container.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/Container.java rename to core/src/main/java/org/apache/struts2/inject/Container.java index 3411e522e8..cc20cf17bf 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Container.java +++ b/core/src/main/java/org/apache/struts2/inject/Container.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.io.Serializable; import java.util.Set; @@ -93,7 +93,7 @@ public interface Container extends Serializable { /** * Gets an instance of the given dependency which was declared in - * {@link com.opensymphony.xwork2.inject.ContainerBuilder}. + * {@link ContainerBuilder}. * * @param type * @param type of dependency @@ -111,7 +111,7 @@ public interface Container extends Serializable { * @return instance */ T getInstance(Class type); - + /** * Gets a set of all registered names for the given type * @param type The instance type diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java b/core/src/main/java/org/apache/struts2/inject/ContainerBuilder.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java rename to core/src/main/java/org/apache/struts2/inject/ContainerBuilder.java index 93ff30588d..3d5f7f6b4f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java +++ b/core/src/main/java/org/apache/struts2/inject/ContainerBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.lang.reflect.Member; import java.util.ArrayList; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerImpl.java b/core/src/main/java/org/apache/struts2/inject/ContainerImpl.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/inject/ContainerImpl.java rename to core/src/main/java/org/apache/struts2/inject/ContainerImpl.java index 0306424b95..f6bb102803 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerImpl.java +++ b/core/src/main/java/org/apache/struts2/inject/ContainerImpl.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; -import com.opensymphony.xwork2.inject.util.ReferenceCache; +import org.apache.struts2.inject.util.ReferenceCache; import java.io.Serializable; import java.lang.annotation.Annotation; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Context.java b/core/src/main/java/org/apache/struts2/inject/Context.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/inject/Context.java rename to core/src/main/java/org/apache/struts2/inject/Context.java index 2f03778146..4269b16288 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Context.java +++ b/core/src/main/java/org/apache/struts2/inject/Context.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.lang.reflect.Member; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/DependencyException.java b/core/src/main/java/org/apache/struts2/inject/DependencyException.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/DependencyException.java rename to core/src/main/java/org/apache/struts2/inject/DependencyException.java index 097476aa29..9a5dcbbfaa 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/DependencyException.java +++ b/core/src/main/java/org/apache/struts2/inject/DependencyException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; /** * Thrown when a dependency is misconfigured. diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/EarlyInitializable.java b/core/src/main/java/org/apache/struts2/inject/EarlyInitializable.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/inject/EarlyInitializable.java rename to core/src/main/java/org/apache/struts2/inject/EarlyInitializable.java index bf5d5f4124..35e471d604 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/EarlyInitializable.java +++ b/core/src/main/java/org/apache/struts2/inject/EarlyInitializable.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; /** * A marking interface that will tell CI to initialise the bean when instating the whole objects' graph diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/ExternalContext.java b/core/src/main/java/org/apache/struts2/inject/ExternalContext.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/inject/ExternalContext.java rename to core/src/main/java/org/apache/struts2/inject/ExternalContext.java index 07c549f2f6..c00e1120d6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/ExternalContext.java +++ b/core/src/main/java/org/apache/struts2/inject/ExternalContext.java @@ -18,7 +18,7 @@ *

    */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.lang.reflect.Member; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Factory.java b/core/src/main/java/org/apache/struts2/inject/Factory.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/Factory.java rename to core/src/main/java/org/apache/struts2/inject/Factory.java index 479384ddbc..c84ac6f287 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Factory.java +++ b/core/src/main/java/org/apache/struts2/inject/Factory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; /** * A custom factory. Creates objects which will be injected. diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Initializable.java b/core/src/main/java/org/apache/struts2/inject/Initializable.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/Initializable.java rename to core/src/main/java/org/apache/struts2/inject/Initializable.java index fbbed28aa6..6774d11d92 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Initializable.java +++ b/core/src/main/java/org/apache/struts2/inject/Initializable.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; /** * Beans marked with this interface will be always initialised diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/InitializableFactory.java b/core/src/main/java/org/apache/struts2/inject/InitializableFactory.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/inject/InitializableFactory.java rename to core/src/main/java/org/apache/struts2/inject/InitializableFactory.java index 26191b3d93..e7734df427 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/InitializableFactory.java +++ b/core/src/main/java/org/apache/struts2/inject/InitializableFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Inject.java b/core/src/main/java/org/apache/struts2/inject/Inject.java similarity index 90% rename from core/src/main/java/com/opensymphony/xwork2/inject/Inject.java rename to core/src/main/java/org/apache/struts2/inject/Inject.java index c661882c70..b8e50814f0 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Inject.java +++ b/core/src/main/java/org/apache/struts2/inject/Inject.java @@ -14,12 +14,11 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import static com.opensymphony.xwork2.inject.Container.DEFAULT_NAME; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; @@ -40,7 +39,7 @@ /** * @return Dependency name. Defaults to {@link Container#DEFAULT_NAME}. */ - String value() default DEFAULT_NAME; + String value() default Container.DEFAULT_NAME; /** * @return Whether or not injection is required. Applicable only to methods and diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/InternalContext.java b/core/src/main/java/org/apache/struts2/inject/InternalContext.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/inject/InternalContext.java rename to core/src/main/java/org/apache/struts2/inject/InternalContext.java index 8a85f5705e..ef2d070fa5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/InternalContext.java +++ b/core/src/main/java/org/apache/struts2/inject/InternalContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.util.HashMap; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/InternalFactory.java b/core/src/main/java/org/apache/struts2/inject/InternalFactory.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/InternalFactory.java rename to core/src/main/java/org/apache/struts2/inject/InternalFactory.java index 5cd8fb0fec..9b69407f92 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/InternalFactory.java +++ b/core/src/main/java/org/apache/struts2/inject/InternalFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.io.Serializable; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Key.java b/core/src/main/java/org/apache/struts2/inject/Key.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/inject/Key.java rename to core/src/main/java/org/apache/struts2/inject/Key.java index 6aff2a5bdb..8a0f66ec82 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Key.java +++ b/core/src/main/java/org/apache/struts2/inject/Key.java @@ -18,7 +18,7 @@ *

    */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; /** * Dependency mapping key. Uniquely identified by the required type and name. diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java b/core/src/main/java/org/apache/struts2/inject/Scope.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/inject/Scope.java rename to core/src/main/java/org/apache/struts2/inject/Scope.java index 3b354cb986..1473a3daf6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java +++ b/core/src/main/java/org/apache/struts2/inject/Scope.java @@ -15,7 +15,7 @@ *

    */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.util.concurrent.Callable; @@ -231,7 +231,7 @@ abstract InternalFactory scopeFactory( * Pluggable scoping strategy. Enables users to provide custom * implementations of request, session, and wizard scopes. Implement and * pass to {@link - * Container#setScopeStrategy(com.opensymphony.xwork2.inject.Scope.Strategy)}. + * Container#setScopeStrategy(Scope.Strategy)}. */ public interface Strategy { diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java b/core/src/main/java/org/apache/struts2/inject/Scoped.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java rename to core/src/main/java/org/apache/struts2/inject/Scoped.java index 9a72d1aa84..66006d8d6e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java +++ b/core/src/main/java/org/apache/struts2/inject/Scoped.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/package-info.java b/core/src/main/java/org/apache/struts2/inject/package-info.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/package-info.java rename to core/src/main/java/org/apache/struts2/inject/package-info.java index b60be547dd..a5ee629eb4 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/package-info.java +++ b/core/src/main/java/org/apache/struts2/inject/package-info.java @@ -27,4 +27,4 @@ *
  • externalize what needs to be and no more
  • *
*/ -package com.opensymphony.xwork2.inject; +package org.apache.struts2.inject; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizablePhantomReference.java b/core/src/main/java/org/apache/struts2/inject/util/FinalizablePhantomReference.java similarity index 85% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizablePhantomReference.java rename to core/src/main/java/org/apache/struts2/inject/util/FinalizablePhantomReference.java index 039a977bda..da7251638e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizablePhantomReference.java +++ b/core/src/main/java/org/apache/struts2/inject/util/FinalizablePhantomReference.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; import java.lang.ref.PhantomReference; /** - * Phantom reference with a {@link com.opensymphony.xwork2.inject.util.FinalizableReference#finalizeReferent() finalizeReferent()} method which a + * Phantom reference with a {@link FinalizableReference#finalizeReferent() finalizeReferent()} method which a * background thread invokes after the garbage collector reclaims the * referent. This is a simpler alternative to using a {@link * java.lang.ref.ReferenceQueue}. diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableReference.java b/core/src/main/java/org/apache/struts2/inject/util/FinalizableReference.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableReference.java rename to core/src/main/java/org/apache/struts2/inject/util/FinalizableReference.java index a31fd217e6..5f181c4bb6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableReference.java +++ b/core/src/main/java/org/apache/struts2/inject/util/FinalizableReference.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; /** * Package-private interface implemented by references that have code to run diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableReferenceQueue.java b/core/src/main/java/org/apache/struts2/inject/util/FinalizableReferenceQueue.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableReferenceQueue.java rename to core/src/main/java/org/apache/struts2/inject/util/FinalizableReferenceQueue.java index 2335b2722a..6556000f76 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableReferenceQueue.java +++ b/core/src/main/java/org/apache/struts2/inject/util/FinalizableReferenceQueue.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableSoftReference.java b/core/src/main/java/org/apache/struts2/inject/util/FinalizableSoftReference.java similarity index 84% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableSoftReference.java rename to core/src/main/java/org/apache/struts2/inject/util/FinalizableSoftReference.java index 0601f9d519..411a8cb13b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableSoftReference.java +++ b/core/src/main/java/org/apache/struts2/inject/util/FinalizableSoftReference.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; import java.lang.ref.SoftReference; /** - * Soft reference with a {@link com.opensymphony.xwork2.inject.util.FinalizableReference#finalizeReferent() finalizeReferent()} method which a background + * Soft reference with a {@link FinalizableReference#finalizeReferent() finalizeReferent()} method which a background * thread invokes after the garbage collector reclaims the referent. This is a * simpler alternative to using a {@link java.lang.ref.ReferenceQueue}. * diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableWeakReference.java b/core/src/main/java/org/apache/struts2/inject/util/FinalizableWeakReference.java similarity index 84% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableWeakReference.java rename to core/src/main/java/org/apache/struts2/inject/util/FinalizableWeakReference.java index 7ec98aad9d..e969f82d06 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/FinalizableWeakReference.java +++ b/core/src/main/java/org/apache/struts2/inject/util/FinalizableWeakReference.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; import java.lang.ref.WeakReference; /** - * Weak reference with a {@link com.opensymphony.xwork2.inject.util.FinalizableReference#finalizeReferent() finalizeReferent()} method which a background + * Weak reference with a {@link FinalizableReference#finalizeReferent() finalizeReferent()} method which a background * thread invokes after the garbage collector reclaims the referent. This is a * simpler alternative to using a {@link java.lang.ref.ReferenceQueue}. * diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/Function.java b/core/src/main/java/org/apache/struts2/inject/util/Function.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/Function.java rename to core/src/main/java/org/apache/struts2/inject/util/Function.java index 2dfcf94b64..92118d6570 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/Function.java +++ b/core/src/main/java/org/apache/struts2/inject/util/Function.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; /** * A Function provides a transformation on an object and returns the resulting diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java b/core/src/main/java/org/apache/struts2/inject/util/ReferenceCache.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java rename to core/src/main/java/org/apache/struts2/inject/util/ReferenceCache.java index 212e735ecb..6e7aaadf92 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java +++ b/core/src/main/java/org/apache/struts2/inject/util/ReferenceCache.java @@ -18,7 +18,7 @@ *

*/ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; import java.io.IOException; import java.io.ObjectInputStream; @@ -30,7 +30,7 @@ import java.util.concurrent.Future; import java.util.concurrent.FutureTask; -import static com.opensymphony.xwork2.inject.util.ReferenceType.STRONG; +import static org.apache.struts2.inject.util.ReferenceType.STRONG; /** * Extends {@link ReferenceMap} to support lazy loading values by overriding diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceMap.java b/core/src/main/java/org/apache/struts2/inject/util/ReferenceMap.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceMap.java rename to core/src/main/java/org/apache/struts2/inject/util/ReferenceMap.java index ce37624254..eed90d00b5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceMap.java +++ b/core/src/main/java/org/apache/struts2/inject/util/ReferenceMap.java @@ -18,7 +18,7 @@ *

*/ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; import java.io.IOException; import java.io.ObjectInputStream; @@ -35,7 +35,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import static com.opensymphony.xwork2.inject.util.ReferenceType.STRONG; +import static org.apache.struts2.inject.util.ReferenceType.STRONG; /** * Concurrent hash map that wraps keys and/or values in soft or weak diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceType.java b/core/src/main/java/org/apache/struts2/inject/util/ReferenceType.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceType.java rename to core/src/main/java/org/apache/struts2/inject/util/ReferenceType.java index b9662732ce..111dc2981f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceType.java +++ b/core/src/main/java/org/apache/struts2/inject/util/ReferenceType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.opensymphony.xwork2.inject.util; +package org.apache.struts2.inject.util; /** * Reference type. Used to specify what type of reference to keep to a diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/package.html b/core/src/main/java/org/apache/struts2/inject/util/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/inject/util/package.html rename to core/src/main/java/org/apache/struts2/inject/util/package.html diff --git a/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java index ecebd3748f..87c1d32f35 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java @@ -18,14 +18,15 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.LocaleProvider; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.LocaleProvider; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.TextProvider; +import org.apache.struts2.TextProviderFactory; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.interceptor.ValidationAware; +import org.apache.struts2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.dispatcher.LocalizedMessage; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ActionFileUploadInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ActionFileUploadInterceptor.java index ecff7d41ee..d5082cc553 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ActionFileUploadInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ActionFileUploadInterceptor.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequestWrapper; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; import org.apache.struts2.action.UploadedFilesAware; import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper; import org.apache.struts2.dispatcher.multipart.UploadedFile; @@ -129,9 +129,6 @@ public class ActionFileUploadInterceptor extends AbstractFileUploadInterceptor { protected static final Logger LOG = LogManager.getLogger(ActionFileUploadInterceptor.class); - /* (non-Javadoc) - * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation) - */ @Override public String intercept(ActionInvocation invocation) throws Exception { HttpServletRequest request = invocation.getInvocationContext().getServletRequest(); diff --git a/core/src/main/java/org/apache/struts2/interceptor/ActionMappingParametersInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ActionMappingParametersInterceptor.java index 3cf53e0a26..b567ea7d72 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ActionMappingParametersInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ActionMappingParametersInterceptor.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; +import org.apache.struts2.ActionContext; import org.apache.struts2.action.ParameterNameAware; import org.apache.struts2.dispatcher.HttpParameters; import org.apache.struts2.dispatcher.mapper.ActionMapping; diff --git a/core/src/main/java/org/apache/struts2/interceptor/AliasInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/AliasInterceptor.java index 58c50e4045..5a02dad968 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/AliasInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/AliasInterceptor.java @@ -18,24 +18,23 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.security.AcceptedPatternsChecker; -import com.opensymphony.xwork2.security.ExcludedPatternsChecker; -import com.opensymphony.xwork2.util.ClearableValueStack; -import com.opensymphony.xwork2.util.Evaluated; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; 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.LocalizedTextProvider; import org.apache.struts2.StrutsConstants; +import org.apache.struts2.config.entities.ActionConfig; import org.apache.struts2.dispatcher.HttpParameters; import org.apache.struts2.dispatcher.Parameter; -import org.apache.struts2.interceptor.parameter.ParametersInterceptor; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.security.AcceptedPatternsChecker; +import org.apache.struts2.security.ExcludedPatternsChecker; +import org.apache.struts2.util.ClearableValueStack; +import org.apache.struts2.util.Evaluated; import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; +import org.apache.struts2.util.reflection.ReflectionContextState; import java.util.Map; @@ -161,9 +160,9 @@ public void setAliasesKey(String aliasesKey) { ValueStack stack = ac.getValueStack(); Object obj = stack.findValue(aliasExpression); - if (obj instanceof Map) { + if (obj instanceof Map aliases) { //get secure stack - ValueStack newStack = valueStackFactory.createValueStack(com.opensymphony.xwork2.util.ValueStack.adapt(stack)); + ValueStack newStack = valueStackFactory.createValueStack(stack); boolean clearableStack = newStack instanceof ClearableValueStack; if (clearableStack) { //if the stack's context can be cleared, do that to prevent OGNL @@ -179,7 +178,6 @@ public void setAliasesKey(String aliasesKey) { } // override - Map aliases = (Map) obj; for (Object o : aliases.entrySet()) { Map.Entry entry = (Map.Entry) o; String name = entry.getKey().toString(); @@ -207,7 +205,7 @@ public void setAliasesKey(String aliasesKey) { newStack.setValue(alias, value.get()); } catch (RuntimeException e) { if (devMode) { - String developerNotification = localizedTextProvider.findText(ParametersInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{ + String developerNotification = localizedTextProvider.findText(AliasInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{ "Unexpected Exception caught setting '" + entry.getKey() + "' on '" + action.getClass() + ": " + e.getMessage() }); LOG.error(developerNotification); diff --git a/core/src/main/java/org/apache/struts2/interceptor/ChainingInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ChainingInterceptor.java index fd3c25a65d..9e38264e90 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ChainingInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ChainingInterceptor.java @@ -18,19 +18,19 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionChainResult; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.ProxyUtil; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.ActionChainResult; import org.apache.struts2.ActionInvocation; import org.apache.struts2.Result; import org.apache.struts2.StrutsConstants; import org.apache.struts2.Unchainable; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.CompoundRoot; +import org.apache.struts2.util.ProxyUtil; +import org.apache.struts2.util.TextParseUtil; import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.reflection.ReflectionProvider; import java.util.ArrayList; import java.util.Collection; @@ -47,7 +47,7 @@ * except for any object that implements {@link Unchainable}. A collection of optional includes and * excludes may be provided to control how and which parameters are copied. Only includes or excludes may be * specified. Specifying both results in undefined behavior. See the javadocs for {@link ReflectionProvider#copy(Object, Object, - * Map, Collection, Collection)} for more information. + * java.util.Map, java.util.Collection, java.util.Collection)} for more information. *

* *

@@ -185,7 +185,7 @@ private Collection prepareExcludes() { Collection localExcludes = excludes; if (!copyErrors || !copyMessages ||!copyFieldErrors) { if (localExcludes == null) { - localExcludes = new HashSet(); + localExcludes = new HashSet<>(); if (!copyErrors) { localExcludes.add(ACTION_ERRORS); } @@ -262,7 +262,6 @@ public void setIncludes(String includes) { this.includes = TextParseUtil.commaDelimitedStringToSet(includes); } - /** * Sets the list of parameter names to include when copying (all others will be excluded). * diff --git a/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java index 9085ac5c00..58f273456b 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.dispatcher.HttpParameters; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java index c8b8021b37..9dcd1824c0 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -76,7 +76,7 @@ public class ClearSessionInterceptor extends AbstractInterceptor { private static final Logger LOG = LogManager.getLogger(ClearSessionInterceptor.class); /* (non-Javadoc) - * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.Interceptor#intercept(org.apache.struts2.ActionInvocation) */ @Override public String intercept(ActionInvocation invocation) throws Exception { diff --git a/core/src/main/java/org/apache/struts2/interceptor/CoepInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CoepInterceptor.java index bb6294493b..935f568740 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/CoepInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/CoepInterceptor.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.interceptor.PreResultListener; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.interceptor.PreResultListener; +import org.apache.struts2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ConversionErrorInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ConversionErrorInterceptor.java index e795543d4b..17133397aa 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ConversionErrorInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ConversionErrorInterceptor.java @@ -18,11 +18,11 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.conversion.impl.ConversionData; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; import org.apache.commons.text.StringEscapeUtils; import org.apache.struts2.ActionContext; import org.apache.struts2.ActionInvocation; +import org.apache.struts2.conversion.impl.ConversionData; +import org.apache.struts2.conversion.impl.XWorkConverter; import org.apache.struts2.util.ValueStack; import java.util.HashMap; @@ -111,11 +111,10 @@ public String doIntercept(ActionInvocation invocation) throws Exception { ConversionData conversionData = entry.getValue(); if (shouldAddError(propertyName, conversionData.getValue())) { - String message = XWorkConverter.getConversionErrorMessage(propertyName, conversionData.getToClass(), com.opensymphony.xwork2.util.ValueStack.adapt(stack)); + String message = XWorkConverter.getConversionErrorMessage(propertyName, conversionData.getToClass(), stack); Object action = invocation.getAction(); - if (action instanceof ValidationAware) { - ValidationAware va = (ValidationAware) action; + if (action instanceof ValidationAware va) { va.addFieldError(propertyName, message); } @@ -130,13 +129,11 @@ public String doIntercept(ActionInvocation invocation) throws Exception { if (fakie != null) { // if there were some errors, put the original (fake) values in place right before the result stack.getContext().put(ORIGINAL_PROPERTY_OVERRIDE, fakie); - invocation.addPreResultListener(new PreResultListener() { - public void beforeResult(ActionInvocation invocation, String resultCode) { - Map fakie = (Map) invocation.getInvocationContext().get(ORIGINAL_PROPERTY_OVERRIDE); + invocation.addPreResultListener((invocation1, resultCode) -> { + var fakie1 = (Map) invocation1.getInvocationContext().get(ORIGINAL_PROPERTY_OVERRIDE); - if (fakie != null) { - invocation.getStack().setExprOverrides(fakie); - } + if (fakie1 != null) { + invocation1.getStack().setExprOverrides(fakie1); } }); } diff --git a/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java index bc1b270184..6ca7ecb0ad 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java @@ -18,19 +18,18 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.security.AcceptedPatternsChecker; -import com.opensymphony.xwork2.security.ExcludedPatternsChecker; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; import jakarta.servlet.http.Cookie; 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.ServletActionContext; import org.apache.struts2.action.CookiesAware; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.security.AcceptedPatternsChecker; +import org.apache.struts2.security.ExcludedPatternsChecker; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.ValueStack; import java.io.Serial; import java.util.Collections; @@ -359,13 +358,9 @@ else if (cookiesValueSet.contains("*")) * @param cookiesMap map of cookies */ protected void injectIntoCookiesAwareAction(Object action, Map cookiesMap) { - if (action instanceof CookiesAware) { + if (action instanceof CookiesAware cookiesAware) { LOG.debug("Action [{}] implements CookiesAware, injecting cookies map [{}]", action, cookiesMap); - ((CookiesAware)action).withCookies(cookiesMap); - } - if (action instanceof org.apache.struts2.action.CookiesAware) { - LOG.debug("Action [{}] implements CookiesAware, injecting cookies map [{}]", action, cookiesMap); - ((org.apache.struts2.action.CookiesAware)action).withCookies(cookiesMap); + cookiesAware.withCookies(cookiesMap); } } } diff --git a/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java index 202686006d..569a3429ec 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/CookieProviderInterceptor.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.interceptor.PreResultListener; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.interceptor.PreResultListener; import jakarta.servlet.http.Cookie; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/interceptor/CoopInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CoopInterceptor.java index 9cf9fe9f1f..794064f0cc 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/CoopInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/CoopInterceptor.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.interceptor.PreResultListener; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.interceptor.PreResultListener; +import org.apache.struts2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java index f732431327..028f7caf20 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpSession; import org.apache.logging.log4j.LogManager; @@ -85,7 +85,7 @@ public class CreateSessionInterceptor extends AbstractInterceptor { /* (non-Javadoc) - * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.Interceptor#intercept(org.apache.struts2.ActionInvocation) */ public String intercept(ActionInvocation invocation) throws Exception { HttpServletRequest servletRequest = invocation.getInvocationContext().getServletRequest(); diff --git a/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java index af8574a8c3..c9bada69dc 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/DateTextFieldInterceptor.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.dispatcher.HttpParameters; diff --git a/core/src/main/java/org/apache/struts2/interceptor/DefaultWorkflowInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/DefaultWorkflowInterceptor.java index c4dd701540..90f7f70a8f 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/DefaultWorkflowInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/DefaultWorkflowInterceptor.java @@ -18,13 +18,15 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.interceptor.annotations.InputConfig; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.MethodUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.Action; import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.annotations.InputConfig; + +import java.io.Serial; /** * @@ -132,6 +134,7 @@ */ public class DefaultWorkflowInterceptor extends MethodFilterInterceptor { + @Serial private static final long serialVersionUID = 7563014655616490865L; private static final Logger LOG = LogManager.getLogger(DefaultWorkflowInterceptor.class); @@ -161,8 +164,7 @@ public void setInputResultName(String inputResultName) { protected String doIntercept(ActionInvocation invocation) throws Exception { Object action = invocation.getAction(); - if (action instanceof ValidationAware) { - ValidationAware validationAwareAction = (ValidationAware) action; + if (action instanceof ValidationAware validationAwareAction) { if (validationAwareAction.hasErrors()) { LOG.debug("Errors on action [{}], returning result name [{}]", validationAwareAction, inputResultName); @@ -180,7 +182,7 @@ protected String doIntercept(ActionInvocation invocation) throws Exception { } /** - * Process {@link com.opensymphony.xwork2.interceptor.ValidationWorkflowAware} interface + * Process {@link ValidationWorkflowAware} interface * * @param action action object * @param currentResultName current result name @@ -189,8 +191,8 @@ protected String doIntercept(ActionInvocation invocation) throws Exception { */ private String processValidationWorkflowAware(final Object action, final String currentResultName) { String resultName = currentResultName; - if (action instanceof ValidationWorkflowAware) { - resultName = ((ValidationWorkflowAware) action).getInputResultName(); + if (action instanceof ValidationWorkflowAware validationWorkflowAware) { + resultName = validationWorkflowAware.getInputResultName(); LOG.debug("Changing result name from [{}] to [{}] because of processing [{}] interface applied to [{}]", currentResultName, resultName, ValidationWorkflowAware.class.getSimpleName(), action); } @@ -224,18 +226,18 @@ protected String processInputConfig(final Object action, final String method, fi } /** - * Notify action if it implements {@link com.opensymphony.xwork2.interceptor.ValidationErrorAware} interface + * Notify action if it implements {@link ValidationErrorAware} interface * * @param action action object * @param currentResultName current result name * * @return result name - * @see com.opensymphony.xwork2.interceptor.ValidationErrorAware + * @see ValidationErrorAware */ protected String processValidationErrorAware(final Object action, final String currentResultName) { String resultName = currentResultName; - if (action instanceof ValidationErrorAware) { - resultName = ((ValidationErrorAware) action).actionErrorOccurred(currentResultName); + if (action instanceof ValidationErrorAware validationErrorAware) { + resultName = validationErrorAware.actionErrorOccurred(currentResultName); LOG.debug("Changing result name from [{}] to [{}] because of processing interface [{}] on action [{}]", currentResultName, resultName, ValidationErrorAware.class.getSimpleName(), action); } diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionHolder.java b/core/src/main/java/org/apache/struts2/interceptor/ExceptionHolder.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionHolder.java rename to core/src/main/java/org/apache/struts2/interceptor/ExceptionHolder.java index ff813dbca5..2980e8c861 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionHolder.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ExceptionHolder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor; +package org.apache.struts2.interceptor; import java.io.IOException; import java.io.PrintWriter; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ExceptionMappingInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ExceptionMappingInterceptor.java index 277fc33dfc..53570184b0 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ExceptionMappingInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ExceptionMappingInterceptor.java @@ -18,11 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig; -import com.opensymphony.xwork2.interceptor.ExceptionHolder; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.ActionInvocation; +import org.apache.struts2.config.entities.ExceptionMappingConfig; import org.apache.struts2.dispatcher.HttpParameters; import java.util.List; @@ -57,7 +56,7 @@ *

  • logLevel (optional) - what log level should we use (trace, debug, info, warn, error, fatal)? - defaut is debug
  • * *
  • logCategory (optional) - If provided we would use this category (eg. com.mycompany.app). - * Default is to use com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.
  • + * Default is to use {@link ExceptionMappingInterceptor}. * * * @@ -73,7 +72,7 @@ * *

    * If you want to add custom handling for publishing the Exception, you may override - * {@link #publishException(ActionInvocation, ExceptionHolder)}. The default implementation + * {@link #publishException(org.apache.struts2.ActionInvocation, ExceptionHolder)}. The default implementation * pushes the given ExceptionHolder on value stack. A custom implementation could add additional logging etc. *

    * @@ -274,12 +273,11 @@ protected ExceptionMappingConfig findMappingFromExceptions(List= 0 && depth < deepest) { deepest = depth; - config = exceptionMappingConfig; + config = exceptionMapping; } } } diff --git a/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java index 822995b8d0..54fa9c1138 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java @@ -18,14 +18,14 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor; +import org.apache.struts2.Action; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.MethodFilterInterceptor; import jakarta.servlet.http.HttpSession; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -228,7 +228,7 @@ protected String getBackgroundProcessName(ActionProxy proxy) { } /* (non-Javadoc) - * @see com.opensymphony.xwork2.interceptor.MethodFilterInterceptor#doIntercept(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.MethodFilterInterceptor#doIntercept(org.apache.struts2.ActionInvocation) */ @Override protected String doIntercept(ActionInvocation actionInvocation) throws Exception { diff --git a/core/src/main/java/org/apache/struts2/interceptor/FetchMetadataInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/FetchMetadataInterceptor.java index e57a6a8ff8..570b1fa972 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/FetchMetadataInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/FetchMetadataInterceptor.java @@ -18,11 +18,11 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java index 6f4bae0e82..63f0d9b460 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.LocaleProvider; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.LocaleProvider; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; diff --git a/core/src/main/java/org/apache/struts2/interceptor/LoggingInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/LoggingInterceptor.java index 4536d462be..ce01c413d8 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/LoggingInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/LoggingInterceptor.java @@ -78,7 +78,7 @@ private void logMessage(ActionInvocation invocation, String baseMessage) { StringBuilder message = new StringBuilder(baseMessage); String namespace = invocation.getProxy().getNamespace(); - if ((namespace != null) && (namespace.trim().length() > 0)) { + if (namespace != null && !namespace.trim().isEmpty()) { message.append(namespace).append("/"); } diff --git a/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java index 0cf3747d56..73fe737542 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.interceptor.ValidationAware; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.interceptor.ValidationAware; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.dispatcher.HttpParameters; @@ -58,7 +58,7 @@ *

    * In the 'AUTOMATIC' mode, the interceptor will always retrieve the stored action's message / errors * and field errors and put them back into the {@link ValidationAware} action, and after Action execution, - * if the {@link com.opensymphony.xwork2.Result} is an instance of {@link ServletRedirectResult}, the action's message / errors + * if the {@link org.apache.struts2.Result} is an instance of {@link ServletRedirectResult}, the action's message / errors * and field errors into automatically be stored in the HTTP session.. *

    * diff --git a/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java b/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java index 845a4f551e..3a7fc7dfaf 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java +++ b/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java @@ -18,9 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.interceptor.PreResultListener; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.interceptor.PreResultListener; +import org.apache.struts2.interceptor.ValidationAware; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.ServletActionContext; diff --git a/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptor.java index 1ffe682619..2e8f96e054 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptor.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.ActionInvocation; +import org.apache.struts2.util.TextParseUtil; import java.util.Collections; import java.util.Set; @@ -67,8 +67,8 @@ * * @see TokenInterceptor * @see TokenSessionStoreInterceptor - * @see com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor - * @see com.opensymphony.xwork2.validator.ValidationInterceptor + * @see DefaultWorkflowInterceptor + * @see org.apache.struts2.validator.ValidationInterceptor */ public abstract class MethodFilterInterceptor extends AbstractInterceptor { diff --git a/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptorUtil.java b/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptorUtil.java index 065305343e..39960c6860 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptorUtil.java +++ b/core/src/main/java/org/apache/struts2/interceptor/MethodFilterInterceptorUtil.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.WildcardHelper; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.WildcardHelper; import java.util.HashMap; import java.util.Set; @@ -27,8 +27,7 @@ import static java.util.Objects.requireNonNullElse; /** - * Utility class contains common methods used by - * {@link MethodFilterInterceptor}. + * Utility class contains common methods used by {@link MethodFilterInterceptor}. * * @author tm_jee */ diff --git a/core/src/main/java/org/apache/struts2/interceptor/ModelDrivenInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ModelDrivenInterceptor.java index d2679ebd68..fb8cb2dd56 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ModelDrivenInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ModelDrivenInterceptor.java @@ -18,10 +18,9 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.util.CompoundRoot; import org.apache.struts2.ActionInvocation; import org.apache.struts2.ModelDriven; -import org.apache.struts2.interceptor.parameter.ParametersInterceptor; +import org.apache.struts2.util.CompoundRoot; import org.apache.struts2.util.ValueStack; /** @@ -30,7 +29,8 @@ * Watches for {@link ModelDriven} actions and adds the action's model on to the value stack. * *

    Note: The ModelDrivenInterceptor must come before the both {@link StaticParametersInterceptor} and - * {@link ParametersInterceptor} if you want the parameters to be applied to the model. + * {@link org.apache.struts2.interceptor.parameter.ParametersInterceptor} if you want the parameters to be applied to + * the model. *

    *

    Note: The ModelDrivenInterceptor will only push the model into the stack when the * model is not null, else it will be ignored. @@ -88,8 +88,7 @@ public void setRefreshModelBeforeResult(boolean val) { public String intercept(ActionInvocation invocation) throws Exception { Object action = invocation.getAction(); - if (action instanceof ModelDriven) { - ModelDriven modelDriven = (ModelDriven) action; + if (action instanceof ModelDriven modelDriven) { ValueStack stack = invocation.getStack(); Object model = modelDriven.getModel(); if (model != null) { @@ -106,7 +105,7 @@ public String intercept(ActionInvocation invocation) throws Exception { * Refreshes the model instance on the value stack, if it has changed */ protected static class RefreshModelBeforeResult implements PreResultListener { - private Object originalModel; + private final Object originalModel; protected ModelDriven action; diff --git a/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java index 0d88b33923..c959c89c3b 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/MultiselectInterceptor.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.apache.struts2.dispatcher.HttpParameters; import org.apache.struts2.dispatcher.Parameter; @@ -44,7 +44,7 @@ public class MultiselectInterceptor extends AbstractInterceptor { * @param ai ActionInvocation * @return the result of the action * @throws Exception if error - * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.Interceptor#intercept(org.apache.struts2.ActionInvocation) */ public String intercept(ActionInvocation ai) throws Exception { HttpParameters parameters = ai.getInvocationContext().getParameters(); diff --git a/core/src/main/java/org/apache/struts2/interceptor/NoOpInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/NoOpInterceptor.java index 0cc101d3d8..79f5030385 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/NoOpInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/NoOpInterceptor.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ParameterRemoverInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ParameterRemoverInterceptor.java index ad72d58530..c71bd4674b 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ParameterRemoverInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ParameterRemoverInterceptor.java @@ -18,7 +18,6 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.ActionContext; @@ -26,6 +25,7 @@ import org.apache.struts2.action.NoParameters; import org.apache.struts2.dispatcher.HttpParameters; import org.apache.struts2.dispatcher.Parameter; +import org.apache.struts2.util.TextParseUtil; import java.util.Collections; import java.util.Set; diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java b/core/src/main/java/org/apache/struts2/interceptor/PrefixMethodInvocationUtil.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java rename to core/src/main/java/org/apache/struts2/interceptor/PrefixMethodInvocationUtil.java index 40cea29a22..dd2cfd0869 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java +++ b/core/src/main/java/org/apache/struts2/interceptor/PrefixMethodInvocationUtil.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor; +package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.ActionInvocation; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -37,7 +37,7 @@ * *

    * In DefaultWorkflowInterceptor - *

    applies only when action implements {@link com.opensymphony.xwork2.Validateable}

    + *

    applies only when action implements {@link org.apache.struts2.Validateable}

    *
      *
    1. if the action class have validate{MethodName}(), it will be invoked
    2. *
    3. else if the action class have validateDo{MethodName}(), it will be invoked
    4. @@ -53,7 +53,7 @@ *
    5. else if the action class have prepareDo(MethodName()}(), it will be invoked
    6. *
    7. no matter if 1] or 2] is performed, if alwaysinvokePrepare property of the interceptor is "true" (which is by default "true"), prepare() will be invoked.
    8. *
    - *

    + *

    * * * @author Philip Luppens @@ -129,10 +129,6 @@ public static void invokePrefixMethod(ActionInvocation actionInvocation, } } - public static void invokePrefixMethod(org.apache.struts2.ActionInvocation actionInvocation, String[] prefixes) throws InvocationTargetException, IllegalAccessException { - invokePrefixMethod(ActionInvocation.adapt(actionInvocation), prefixes); - } - /** * This method returns a {@link Method} in action. The method * returned is found by searching for method in action whose method name diff --git a/core/src/main/java/org/apache/struts2/interceptor/PrepareInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/PrepareInterceptor.java index a410c3b127..a148010997 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/PrepareInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/PrepareInterceptor.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil; import org.apache.struts2.ActionInvocation; import org.apache.struts2.Preparable; +import java.io.Serial; import java.lang.reflect.InvocationTargetException; /** @@ -100,6 +100,7 @@ */ public class PrepareInterceptor extends MethodFilterInterceptor { + @Serial private static final long serialVersionUID = -5216969014510719786L; private final static String PREPARE_PREFIX = "prepare"; diff --git a/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java index 5e0d31e45e..722a7f7835 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java index f3e6a5cb6e..b899b7f84a 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.interceptor.PreResultListener; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.interceptor.PreResultListener; +import org.apache.struts2.util.ValueStack; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; @@ -327,7 +327,7 @@ public void setKey(String key) { } /* (non-Javadoc) - * @see com.opensymphony.xwork2.interceptor.PreResultListener#beforeResult(com.opensymphony.xwork2.ActionInvocation, java.lang.String) + * @see org.apache.struts2.interceptor.PreResultListener#beforeResult(org.apache.struts2.ActionInvocation, java.lang.String) */ public void beforeResult(ActionInvocation invocation, String resultCode) { String key = getKey(invocation); @@ -405,7 +405,7 @@ public void setSessionReset(String sessionReset) { } /* (non-Javadoc) - * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.Interceptor#intercept(org.apache.struts2.ActionInvocation) */ public String intercept(ActionInvocation invocation) throws Exception { String result; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ScopedModelDrivenInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ScopedModelDrivenInterceptor.java index ddf4265191..9336dfb298 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ScopedModelDrivenInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ScopedModelDrivenInterceptor.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.inject.Inject; import org.apache.struts2.ActionContext; import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ObjectFactory; import org.apache.struts2.StrutsException; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.inject.Inject; import java.lang.reflect.Method; import java.util.Map; @@ -114,8 +114,7 @@ protected Object resolveModel(ObjectFactory factory, ActionContext actionContext public String intercept(ActionInvocation invocation) throws Exception { Object action = invocation.getAction(); - if (action instanceof ScopedModelDriven) { - ScopedModelDriven modelDriven = (ScopedModelDriven) action; + if (action instanceof ScopedModelDriven modelDriven) { if (modelDriven.getModel() == null) { ActionContext ctx = ActionContext.getContext(); ActionConfig config = invocation.getProxy().getConfig(); @@ -127,7 +126,7 @@ public String intercept(ActionInvocation invocation) throws Exception { Class cls = method.getReturnType(); cName = cls.getName(); } catch (NoSuchMethodException e) { - throw new StrutsException("The " + GET_MODEL + "() is not defined in action " + action.getClass() + "", config); + throw new StrutsException("The " + GET_MODEL + "() is not defined in action " + action.getClass(), config); } } String modelName = name; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ServletConfigInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ServletConfigInterceptor.java index d2cd5ab437..ccfd496dc6 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ServletConfigInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ServletConfigInterceptor.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import jakarta.servlet.ServletContext; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/interceptor/StaticParametersInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/StaticParametersInterceptor.java index 2f7ccac37a..65c6d57fa5 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/StaticParametersInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/StaticParametersInterceptor.java @@ -18,23 +18,22 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.Parameterizable; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClearableValueStack; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; import org.apache.commons.lang3.BooleanUtils; 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.LocalizedTextProvider; import org.apache.struts2.StrutsConstants; +import org.apache.struts2.config.entities.ActionConfig; +import org.apache.struts2.config.entities.Parameterizable; import org.apache.struts2.dispatcher.HttpParameters; -import org.apache.struts2.interceptor.parameter.ParametersInterceptor; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClearableValueStack; +import org.apache.struts2.util.TextParseUtil; import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; +import org.apache.struts2.util.reflection.ReflectionContextState; import java.util.Collections; import java.util.Map; @@ -153,7 +152,7 @@ public String intercept(ActionInvocation invocation) throws Exception { ReflectionContextState.setReportingConversionErrors(contextMap, true); final ValueStack stack = ac.getValueStack(); - ValueStack newStack = valueStackFactory.createValueStack(com.opensymphony.xwork2.util.ValueStack.adapt(stack)); + ValueStack newStack = valueStackFactory.createValueStack(stack); boolean clearableStack = newStack instanceof ClearableValueStack; if (clearableStack) { //if the stack's context can be cleared, do that to prevent OGNL @@ -170,15 +169,15 @@ public String intercept(ActionInvocation invocation) throws Exception { for (Map.Entry entry : parameters.entrySet()) { Object val = entry.getValue(); - if (parse && val instanceof String) { - val = TextParseUtil.translateVariables(val.toString(), com.opensymphony.xwork2.util.ValueStack.adapt(stack)); + if (parse && val != null) { + val = TextParseUtil.translateVariables(val.toString(), stack); } try { newStack.setValue(entry.getKey(), val); } catch (RuntimeException e) { if (devMode) { - String developerNotification = localizedTextProvider.findText(ParametersInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{ + String developerNotification = localizedTextProvider.findText(StaticParametersInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{ "Unexpected Exception caught setting '" + entry.getKey() + "' on '" + action.getClass() + ": " + e.getMessage() }); LOG.error(developerNotification); diff --git a/core/src/main/java/org/apache/struts2/interceptor/StrutsConversionErrorInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/StrutsConversionErrorInterceptor.java index b7a345429d..b3f88c9a4e 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/StrutsConversionErrorInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/StrutsConversionErrorInterceptor.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.ConversionErrorInterceptor; +import org.apache.struts2.util.ValueStack; import java.io.Serial; @@ -63,7 +63,7 @@ * * * - * @see com.opensymphony.xwork2.ActionContext#getConversionErrors() + * @see org.apache.struts2.ActionContext#getConversionErrors() * @see ConversionErrorInterceptor */ public class StrutsConversionErrorInterceptor extends ConversionErrorInterceptor { diff --git a/core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java index 2fe2a30117..83d344474d 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java @@ -18,11 +18,12 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.TextProvider; +import org.apache.struts2.TextProviderFactory; +import org.apache.struts2.interceptor.ValidationAware; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.MethodFilterInterceptor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.ServletActionContext; @@ -130,7 +131,7 @@ public void setTextProviderFactory(TextProviderFactory textProviderFactory) { } /** - * @see com.opensymphony.xwork2.interceptor.MethodFilterInterceptor#doIntercept(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.MethodFilterInterceptor#doIntercept(org.apache.struts2.ActionInvocation) */ @Override protected String doIntercept(ActionInvocation invocation) throws Exception { diff --git a/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java index cdcb0f2f85..331f8e6c79 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.Result; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpSession; diff --git a/core/src/main/java/org/apache/struts2/interceptor/ValidationErrorAware.java b/core/src/main/java/org/apache/struts2/interceptor/ValidationErrorAware.java index 7722ed9ec6..5f30fce864 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/ValidationErrorAware.java +++ b/core/src/main/java/org/apache/struts2/interceptor/ValidationErrorAware.java @@ -20,7 +20,7 @@ /** * ValidationErrorAware classes can be notified about validation errors - * before {@link com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor} will return 'inputResultName' result + * before {@link DefaultWorkflowInterceptor} will return 'inputResultName' result * to allow change or not the result name * * This interface can be only applied to action which already implements {@link ValidationAware} interface! diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/WithLazyParams.java b/core/src/main/java/org/apache/struts2/interceptor/WithLazyParams.java similarity index 77% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/WithLazyParams.java rename to core/src/main/java/org/apache/struts2/interceptor/WithLazyParams.java index 3802b2cecf..9995461602 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/WithLazyParams.java +++ b/core/src/main/java/org/apache/struts2/interceptor/WithLazyParams.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor; +package org.apache.struts2.interceptor; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.OgnlUtil; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.TextParser; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.ActionContext; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.OgnlUtil; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.TextParser; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.reflection.ReflectionProvider; import java.util.Map; @@ -67,10 +67,6 @@ public void setOgnlUtil(OgnlUtil ognlUtil) { } public Interceptor injectParams(Interceptor interceptor, Map params, ActionContext invocationContext) { - return (Interceptor) injectParams((org.apache.struts2.interceptor.Interceptor) interceptor, params, invocationContext); - } - - public org.apache.struts2.interceptor.Interceptor injectParams(org.apache.struts2.interceptor.Interceptor interceptor, Map params, ActionContext invocationContext) { for (Map.Entry entry : params.entrySet()) { Object paramValue = textParser.evaluate(new char[]{ '$' }, entry.getValue(), valueEvaluator, TextParser.DEFAULT_LOOP_COUNT); ognlUtil.setProperty(entry.getKey(), paramValue, interceptor, invocationContext.getContextMap()); diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java b/core/src/main/java/org/apache/struts2/interceptor/annotations/After.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java rename to core/src/main/java/org/apache/struts2/interceptor/annotations/After.java index 4df5b57d8d..2cbedc0d44 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java +++ b/core/src/main/java/org/apache/struts2/interceptor/annotations/After.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor.annotations; +package org.apache.struts2.interceptor.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -80,5 +80,5 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) public @interface After { - int priority() default 10; + int priority() default 10; } diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/annotations/AnnotationWorkflowInterceptor.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java rename to core/src/main/java/org/apache/struts2/interceptor/annotations/AnnotationWorkflowInterceptor.java index 6f0a936999..502cf1cd96 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/annotations/AnnotationWorkflowInterceptor.java @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor.annotations; +package org.apache.struts2.interceptor.annotations; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.interceptor.PreResultListener; import org.apache.commons.lang3.reflect.MethodUtils; +import org.apache.struts2.ActionInvocation; import org.apache.struts2.StrutsException; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.interceptor.PreResultListener; import java.lang.reflect.Method; import java.util.ArrayList; @@ -108,7 +108,7 @@ public class AnnotationWorkflowInterceptor extends AbstractInterceptor implement /** * Discovers annotated methods on the action and calls them according to the workflow * - * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.Interceptor#intercept(ActionInvocation) */ public String intercept(ActionInvocation invocation) throws Exception { final Object action = invocation.getAction(); @@ -154,7 +154,7 @@ protected static int comparePriorities(int val1, int val2) { /** * Invokes any @BeforeResult annotated methods * - * @see com.opensymphony.xwork2.interceptor.PreResultListener#beforeResult(com.opensymphony.xwork2.ActionInvocation,String) + * @see org.apache.struts2.interceptor.PreResultListener#beforeResult(ActionInvocation, String) */ public void beforeResult(ActionInvocation invocation, String resultCode) { Object action = invocation.getAction(); diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java b/core/src/main/java/org/apache/struts2/interceptor/annotations/Before.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java rename to core/src/main/java/org/apache/struts2/interceptor/annotations/Before.java index d8fc163f93..c2202b5bff 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java +++ b/core/src/main/java/org/apache/struts2/interceptor/annotations/Before.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor.annotations; +package org.apache.struts2.interceptor.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -79,5 +79,5 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) public @interface Before { - int priority() default 10; + int priority() default 10; } diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java b/core/src/main/java/org/apache/struts2/interceptor/annotations/BeforeResult.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java rename to core/src/main/java/org/apache/struts2/interceptor/annotations/BeforeResult.java index 90665932f0..ce1a674659 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java +++ b/core/src/main/java/org/apache/struts2/interceptor/annotations/BeforeResult.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor.annotations; +package org.apache.struts2.interceptor.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -79,5 +79,5 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) public @interface BeforeResult { - int priority() default 10; + int priority() default 10; } diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java b/core/src/main/java/org/apache/struts2/interceptor/annotations/InputConfig.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java rename to core/src/main/java/org/apache/struts2/interceptor/annotations/InputConfig.java index 2d4dc1f660..695f4f7509 100644 --- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java +++ b/core/src/main/java/org/apache/struts2/interceptor/annotations/InputConfig.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.interceptor.annotations; +package org.apache.struts2.interceptor.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; /** * diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/package.html b/core/src/main/java/org/apache/struts2/interceptor/annotations/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/package.html rename to core/src/main/java/org/apache/struts2/interceptor/annotations/package.html diff --git a/core/src/main/java/org/apache/struts2/interceptor/csp/CspInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/csp/CspInterceptor.java index 2210b970d3..1d944ef770 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/csp/CspInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/csp/CspInterceptor.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.interceptor.csp; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.util.ClassLoaderUtil; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java index f51eb18230..156fcc47a7 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.interceptor.debugging; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.reflection.ReflectionProvider; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -99,7 +99,7 @@ public class DebuggingInterceptor extends AbstractInterceptor { private final static Logger LOG = LogManager.getLogger(DebuggingInterceptor.class); - private final String[] ignorePrefixes = new String[]{"org.apache.struts.", "com.opensymphony.xwork2.", "xwork."}; + private final String[] ignorePrefixes = new String[]{"org.apache.struts.", "org.apache.struts2.", "xwork."}; private final Set ignoreKeys = Set.of( DispatcherConstants.APPLICATION, DispatcherConstants.SESSION, @@ -145,7 +145,7 @@ public void setReflectionProvider(ReflectionProvider reflectionProvider) { /* * (non-Javadoc) * - * @see com.opensymphony.xwork2.interceptor.Interceptor#invoke(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.interceptor.Interceptor#invoke(org.apache.struts2.ActionInvocation) */ public String intercept(ActionInvocation inv) throws Exception { boolean actionOnly = false; diff --git a/core/src/main/java/org/apache/struts2/interceptor/debugging/ObjectToHTMLWriter.java b/core/src/main/java/org/apache/struts2/interceptor/debugging/ObjectToHTMLWriter.java index 1839e624a4..6b1a975edf 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/debugging/ObjectToHTMLWriter.java +++ b/core/src/main/java/org/apache/struts2/interceptor/debugging/ObjectToHTMLWriter.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor.debugging; -import com.opensymphony.xwork2.util.reflection.ReflectionException; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.util.reflection.ReflectionException; +import org.apache.struts2.util.reflection.ReflectionProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/interceptor/exec/BackgroundProcess.java b/core/src/main/java/org/apache/struts2/interceptor/exec/BackgroundProcess.java index 732c3d0af8..a9ca48d20c 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/exec/BackgroundProcess.java +++ b/core/src/main/java/org/apache/struts2/interceptor/exec/BackgroundProcess.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.interceptor.exec; -import com.opensymphony.xwork2.ActionInvocation; +import org.apache.struts2.ActionInvocation; import org.apache.struts2.interceptor.ExecuteAndWaitInterceptor; /** diff --git a/core/src/main/java/org/apache/struts2/interceptor/exec/StrutsBackgroundProcess.java b/core/src/main/java/org/apache/struts2/interceptor/exec/StrutsBackgroundProcess.java index 2ffef7e9aa..adab43dc6e 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/exec/StrutsBackgroundProcess.java +++ b/core/src/main/java/org/apache/struts2/interceptor/exec/StrutsBackgroundProcess.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.interceptor.exec; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodInterceptor.java index c3af555139..cc2dd4cc8f 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodInterceptor.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.interceptor.httpmethod; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import com.opensymphony.xwork2.util.AnnotationUtils; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; +import org.apache.struts2.util.AnnotationUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/package.html b/core/src/main/java/org/apache/struts2/interceptor/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/interceptor/package.html rename to core/src/main/java/org/apache/struts2/interceptor/package.html diff --git a/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java index 67e0d9142d..2a66b21182 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java @@ -18,20 +18,20 @@ */ package org.apache.struts2.interceptor.parameter; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ModelDriven; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor; -import com.opensymphony.xwork2.security.AcceptedPatternsChecker; -import com.opensymphony.xwork2.security.DefaultAcceptedPatternsChecker; -import com.opensymphony.xwork2.security.ExcludedPatternsChecker; -import com.opensymphony.xwork2.util.ClearableValueStack; -import com.opensymphony.xwork2.util.MemberAccessValueStack; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ModelDriven; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.MethodFilterInterceptor; +import org.apache.struts2.security.AcceptedPatternsChecker; +import org.apache.struts2.security.DefaultAcceptedPatternsChecker; +import org.apache.struts2.security.ExcludedPatternsChecker; +import org.apache.struts2.util.ClearableValueStack; +import org.apache.struts2.util.MemberAccessValueStack; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; +import org.apache.struts2.util.reflection.ReflectionContextState; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.ClassUtils; import org.apache.logging.log4j.LogManager; @@ -63,10 +63,10 @@ import java.util.TreeMap; import java.util.regex.Pattern; -import static com.opensymphony.xwork2.security.DefaultAcceptedPatternsChecker.NESTING_CHARS; -import static com.opensymphony.xwork2.security.DefaultAcceptedPatternsChecker.NESTING_CHARS_STR; -import static com.opensymphony.xwork2.util.DebugUtils.logWarningForFirstOccurrence; -import static com.opensymphony.xwork2.util.DebugUtils.notifyDeveloperOfError; +import static org.apache.struts2.security.DefaultAcceptedPatternsChecker.NESTING_CHARS; +import static org.apache.struts2.security.DefaultAcceptedPatternsChecker.NESTING_CHARS_STR; +import static org.apache.struts2.util.DebugUtils.logWarningForFirstOccurrence; +import static org.apache.struts2.util.DebugUtils.notifyDeveloperOfError; import static java.lang.String.format; import static java.util.Collections.unmodifiableSet; import static java.util.stream.Collectors.joining; diff --git a/core/src/main/java/org/apache/struts2/interceptor/parameter/StrutsParameter.java b/core/src/main/java/org/apache/struts2/interceptor/parameter/StrutsParameter.java index 2a19aa83fa..99de060ff8 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/parameter/StrutsParameter.java +++ b/core/src/main/java/org/apache/struts2/interceptor/parameter/StrutsParameter.java @@ -24,7 +24,7 @@ import java.lang.annotation.Target; /** - * Used to annotate public getter/setter methods or fields on {@link com.opensymphony.xwork2.Action} classes that are + * Used to annotate public getter/setter methods or fields on {@link org.apache.struts2.Action} classes that are * intended for parameter injection by the {@link ParametersInterceptor}. * * @since 6.4.0 diff --git a/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java index 9b4e6d7e96..f82d35555b 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.interceptor.validation; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.validator.ValidationInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.validator.ValidationInterceptor; import org.apache.commons.lang3.reflect.MethodUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockActionInvocation.java b/core/src/main/java/org/apache/struts2/mock/MockActionInvocation.java similarity index 83% rename from core/src/main/java/com/opensymphony/xwork2/mock/MockActionInvocation.java rename to core/src/main/java/org/apache/struts2/mock/MockActionInvocation.java index f37e8a6ae0..ddfc2bdedf 100644 --- a/core/src/main/java/com/opensymphony/xwork2/mock/MockActionInvocation.java +++ b/core/src/main/java/org/apache/struts2/mock/MockActionInvocation.java @@ -16,11 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.mock; +package org.apache.struts2.mock; -import com.opensymphony.xwork2.*; -import com.opensymphony.xwork2.interceptor.PreResultListener; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionEventListener; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.Result; +import org.apache.struts2.interceptor.PreResultListener; +import org.apache.struts2.util.ValueStack; import java.util.ArrayList; import java.util.List; @@ -43,7 +47,7 @@ public class MockActionInvocation implements ActionInvocation { private String resultCode; private ValueStack stack; - private List preResultListeners = new ArrayList<>(); + private final List preResultListeners = new ArrayList<>(); public Object getAction() { return action; @@ -102,9 +106,8 @@ public void addPreResultListener(PreResultListener listener) { } public String invoke() throws Exception { - for (Object preResultListener : preResultListeners) { - PreResultListener listener = (PreResultListener) preResultListener; - listener.beforeResult(this, resultCode); + for (PreResultListener preResultListener : preResultListeners) { + preResultListener.beforeResult(this, resultCode); } return resultCode; } @@ -116,7 +119,7 @@ public String invokeActionOnly() throws Exception { public void setActionEventListener(ActionEventListener listener) { this.actionEventListener = listener; } - + public ActionEventListener getActionEventListener() { return this.actionEventListener; } diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockActionProxy.java b/core/src/main/java/org/apache/struts2/mock/MockActionProxy.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/mock/MockActionProxy.java rename to core/src/main/java/org/apache/struts2/mock/MockActionProxy.java index 454fdea87c..9ad52ed837 100644 --- a/core/src/main/java/com/opensymphony/xwork2/mock/MockActionProxy.java +++ b/core/src/main/java/org/apache/struts2/mock/MockActionProxy.java @@ -16,21 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.mock; +package org.apache.struts2.mock; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.entities.ActionConfig; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.entities.ActionConfig; import org.apache.commons.lang3.StringUtils; /** * Mock for an {@link ActionProxy}. - * + * * @author Patrick Lightbody (plightbo at gmail dot com) */ public class MockActionProxy implements ActionProxy { - + Object action; String actionName; ActionConfig config; @@ -44,7 +44,7 @@ public class MockActionProxy implements ActionProxy { boolean methodSpecified; public void prepare() throws Exception {} - + public String execute() throws Exception { executedCalled = true; diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockContainer.java b/core/src/main/java/org/apache/struts2/mock/MockContainer.java similarity index 91% rename from core/src/main/java/com/opensymphony/xwork2/mock/MockContainer.java rename to core/src/main/java/org/apache/struts2/mock/MockContainer.java index ae153b5cb9..41fab15fe9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/mock/MockContainer.java +++ b/core/src/main/java/org/apache/struts2/mock/MockContainer.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.mock; +package org.apache.struts2.mock; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Scope; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Scope; import java.util.Set; diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java b/core/src/main/java/org/apache/struts2/mock/MockInterceptor.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java rename to core/src/main/java/org/apache/struts2/mock/MockInterceptor.java index 58c60a288e..fc7bf86869 100644 --- a/core/src/main/java/com/opensymphony/xwork2/mock/MockInterceptor.java +++ b/core/src/main/java/org/apache/struts2/mock/MockInterceptor.java @@ -16,21 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.mock; +package org.apache.struts2.mock; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.interceptor.AbstractInterceptor; import org.junit.Assert; /** - * Mock for an {@link com.opensymphony.xwork2.interceptor.Interceptor}. + * Mock for an {@link org.apache.struts2.interceptor.Interceptor}. * * @author Jason Carreira */ public class MockInterceptor extends AbstractInterceptor { private static final long serialVersionUID = 2692551676567227756L; - + public static final String DEFAULT_FOO_VALUE = "fooDefault"; diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java b/core/src/main/java/org/apache/struts2/mock/MockObjectTypeDeterminer.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java rename to core/src/main/java/org/apache/struts2/mock/MockObjectTypeDeterminer.java index 4c8eef88d2..6c5f243800 100644 --- a/core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java +++ b/core/src/main/java/org/apache/struts2/mock/MockObjectTypeDeterminer.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.mock; +package org.apache.struts2.mock; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.conversion.ObjectTypeDeterminer; import ognl.OgnlException; import ognl.OgnlRuntime; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockResult.java b/core/src/main/java/org/apache/struts2/mock/MockResult.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/mock/MockResult.java rename to core/src/main/java/org/apache/struts2/mock/MockResult.java index 6d3debec37..4993d8deb2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/mock/MockResult.java +++ b/core/src/main/java/org/apache/struts2/mock/MockResult.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.mock; +package org.apache.struts2.mock; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.Result; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.Result; /** * Mock for a {@link Result}. diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/package.html b/core/src/main/java/org/apache/struts2/mock/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/mock/package.html rename to core/src/main/java/org/apache/struts2/mock/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/BeanInfoCacheFactory.java b/core/src/main/java/org/apache/struts2/ognl/BeanInfoCacheFactory.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/ognl/BeanInfoCacheFactory.java rename to core/src/main/java/org/apache/struts2/ognl/BeanInfoCacheFactory.java index 58d03f5a14..82f5059c08 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/BeanInfoCacheFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/BeanInfoCacheFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; /** * A proxy interface to be used with Struts DI mechanism diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlBeanInfoCacheFactory.java b/core/src/main/java/org/apache/struts2/ognl/DefaultOgnlBeanInfoCacheFactory.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlBeanInfoCacheFactory.java rename to core/src/main/java/org/apache/struts2/ognl/DefaultOgnlBeanInfoCacheFactory.java index 3513e6a818..6c4bb5ec96 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlBeanInfoCacheFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/DefaultOgnlBeanInfoCacheFactory.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.EnumUtils; import org.apache.struts2.StrutsConstants; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java b/core/src/main/java/org/apache/struts2/ognl/DefaultOgnlCacheFactory.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java rename to core/src/main/java/org/apache/struts2/ognl/DefaultOgnlCacheFactory.java index 889591b69f..3bae815488 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/DefaultOgnlCacheFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; /** *

    Default OGNL Cache factory implementation.

    diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlExpressionCacheFactory.java b/core/src/main/java/org/apache/struts2/ognl/DefaultOgnlExpressionCacheFactory.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlExpressionCacheFactory.java rename to core/src/main/java/org/apache/struts2/ognl/DefaultOgnlExpressionCacheFactory.java index 9a8555f912..b39ce7d0fd 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlExpressionCacheFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/DefaultOgnlExpressionCacheFactory.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.EnumUtils; import org.apache.struts2.StrutsConstants; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/ErrorMessageBuilder.java b/core/src/main/java/org/apache/struts2/ognl/ErrorMessageBuilder.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ognl/ErrorMessageBuilder.java rename to core/src/main/java/org/apache/struts2/ognl/ErrorMessageBuilder.java index ad54b2015d..81c4bc373f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/ErrorMessageBuilder.java +++ b/core/src/main/java/org/apache/struts2/ognl/ErrorMessageBuilder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; /** * Helper class to build error messages. diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/ExpressionCacheFactory.java b/core/src/main/java/org/apache/struts2/ognl/ExpressionCacheFactory.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/ognl/ExpressionCacheFactory.java rename to core/src/main/java/org/apache/struts2/ognl/ExpressionCacheFactory.java index 182a31b88a..a983b5de33 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/ExpressionCacheFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/ExpressionCacheFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; /** * A proxy interface to be used with Struts DI mechanism diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/ObjectProxy.java b/core/src/main/java/org/apache/struts2/ognl/ObjectProxy.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/ognl/ObjectProxy.java rename to core/src/main/java/org/apache/struts2/ognl/ObjectProxy.java index dac3ea65f8..759a8c5b7b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/ObjectProxy.java +++ b/core/src/main/java/org/apache/struts2/ognl/ObjectProxy.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; /** * An Object to use within OGNL to proxy other Objects diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCache.java b/core/src/main/java/org/apache/struts2/ognl/OgnlCache.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCache.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlCache.java index fc83666991..ec2d002e97 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCache.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlCache.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; /** * A basic cache interface for use with OGNL processing (such as Expression, BeanInfo). diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCacheFactory.java b/core/src/main/java/org/apache/struts2/ognl/OgnlCacheFactory.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCacheFactory.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlCacheFactory.java index 708c6728d9..5b28ccadf2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCacheFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlCacheFactory.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; /** - * Used by {@link com.opensymphony.xwork2.ognl.OgnlUtil} to create appropriate OGNL + * Used by {@link org.apache.struts2.ognl.OgnlUtil} to create appropriate OGNL * caches based on configuration. * * @param The type for the cache key entries diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCaffeineCache.java b/core/src/main/java/org/apache/struts2/ognl/OgnlCaffeineCache.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCaffeineCache.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlCaffeineCache.java index b7a0241e39..22ba4c62ec 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCaffeineCache.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlCaffeineCache.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlDefaultCache.java b/core/src/main/java/org/apache/struts2/ognl/OgnlDefaultCache.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlDefaultCache.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlDefaultCache.java index 920403a5d2..727c2177d1 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlDefaultCache.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlDefaultCache.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; diff --git a/core/src/main/java/org/apache/struts2/ognl/OgnlGuard.java b/core/src/main/java/org/apache/struts2/ognl/OgnlGuard.java index 8924c4684c..922b2b91bc 100644 --- a/core/src/main/java/org/apache/struts2/ognl/OgnlGuard.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlGuard.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.ognl; -import com.opensymphony.xwork2.ognl.OgnlUtil; +import org.apache.struts2.ognl.OgnlUtil; import ognl.Ognl; import ognl.OgnlException; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java b/core/src/main/java/org/apache/struts2/ognl/OgnlLRUCache.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlLRUCache.java index 9de52f686d..6b43d71f23 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlLRUCache.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; import java.util.Collections; import java.util.LinkedHashMap; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlNullHandlerWrapper.java b/core/src/main/java/org/apache/struts2/ognl/OgnlNullHandlerWrapper.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlNullHandlerWrapper.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlNullHandlerWrapper.java index d05d4636db..aac6a478a0 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlNullHandlerWrapper.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlNullHandlerWrapper.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.conversion.NullHandler; +import org.apache.struts2.conversion.NullHandler; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionContextFactory.java b/core/src/main/java/org/apache/struts2/ognl/OgnlReflectionContextFactory.java similarity index 90% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionContextFactory.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlReflectionContextFactory.java index b1821ccf5f..92f079335d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionContextFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlReflectionContextFactory.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory; +import org.apache.struts2.util.reflection.ReflectionContextFactory; import ognl.Ognl; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java b/core/src/main/java/org/apache/struts2/ognl/OgnlReflectionProvider.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlReflectionProvider.java index 23dec6343e..9df38d9ae6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlReflectionProvider.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.reflection.ReflectionException; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.reflection.ReflectionException; +import org.apache.struts2.util.reflection.ReflectionProvider; import ognl.OgnlException; import ognl.OgnlRuntime; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlTypeConverterWrapper.java b/core/src/main/java/org/apache/struts2/ognl/OgnlTypeConverterWrapper.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlTypeConverterWrapper.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlTypeConverterWrapper.java index 65e614afe8..100fc61b92 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlTypeConverterWrapper.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlTypeConverterWrapper.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverter; import java.lang.reflect.Member; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/org/apache/struts2/ognl/OgnlUtil.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlUtil.java index 043f602046..95bee5f430 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlUtil.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; - -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.accessor.RootAccessor; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.reflection.ReflectionException; +package org.apache.struts2.ognl; + +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.accessor.RootAccessor; +import org.apache.struts2.util.CompoundRoot; +import org.apache.struts2.util.reflection.ReflectionException; import ognl.ClassResolver; import ognl.Ognl; import ognl.OgnlContext; @@ -495,7 +495,7 @@ private void checkArithmeticExpression(Object tree, Map context) /** * Copies the properties in the object "from" and sets them in the object "to" - * using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none + * using specified type converter, or {@link XWorkConverter} if none * is specified. * * @param from the source object @@ -512,7 +512,7 @@ public void copy(final Object from, final Object to, final Map c /** * Copies the properties in the object "from" and sets them in the object "to" * only setting properties defined in the given "editable" class (or interface) - * using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none + * using specified type converter, or {@link XWorkConverter} if none * is specified. * * @param from the source object @@ -591,7 +591,7 @@ public void copy(final Object from, /** * Copies the properties in the object "from" and sets them in the object "to" - * using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none + * using specified type converter, or {@link XWorkConverter} if none * is specified. * * @param from the source object diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java b/core/src/main/java/org/apache/struts2/ognl/OgnlValueStack.java similarity index 88% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlValueStack.java index 50de36d48d..a155c1cbc4 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlValueStack.java @@ -16,19 +16,19 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.accessor.RootAccessor; -import com.opensymphony.xwork2.util.ClearableValueStack; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.MemberAccessValueStack; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +package org.apache.struts2.ognl; + +import org.apache.struts2.ActionContext; +import org.apache.struts2.TextProvider; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.accessor.RootAccessor; +import org.apache.struts2.util.ClearableValueStack; +import org.apache.struts2.util.CompoundRoot; +import org.apache.struts2.util.MemberAccessValueStack; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.MethodFailedException; import ognl.NoSuchPropertyException; import ognl.Ognl; @@ -65,7 +65,7 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS @Serial private static final long serialVersionUID = 370737852934925530L; - private static final String MAP_IDENTIFIER_KEY = "com.opensymphony.xwork2.util.OgnlValueStack.MAP_IDENTIFIER_KEY"; + private static final String MAP_IDENTIFIER_KEY = "org.apache.struts2.util.OgnlValueStack.MAP_IDENTIFIER_KEY"; protected CompoundRoot root; protected transient Map context; @@ -144,7 +144,7 @@ protected void setShouldFallbackToContext(String shouldFallbackToContext) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#getContext() + * @see org.apache.struts2.util.ValueStack#getContext() */ @Override public Map getContext() { @@ -157,7 +157,7 @@ public ActionContext getActionContext() { } /** - * @see com.opensymphony.xwork2.util.ValueStack#setDefaultType(java.lang.Class) + * @see org.apache.struts2.util.ValueStack#setDefaultType(java.lang.Class) */ @Override public void setDefaultType(Class defaultType) { @@ -165,7 +165,7 @@ public void setDefaultType(Class defaultType) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#setExprOverrides(java.util.Map) + * @see org.apache.struts2.util.ValueStack#setExprOverrides(java.util.Map) */ public void setExprOverrides(Map overrides) { if (this.overrides == null) { @@ -176,7 +176,7 @@ public void setExprOverrides(Map overrides) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#getExprOverrides() + * @see org.apache.struts2.util.ValueStack#getExprOverrides() */ @Override public Map getExprOverrides() { @@ -184,7 +184,7 @@ public Map getExprOverrides() { } /** - * @see com.opensymphony.xwork2.util.ValueStack#getRoot() + * @see org.apache.struts2.util.ValueStack#getRoot() */ @Override public CompoundRoot getRoot() { @@ -192,7 +192,7 @@ public CompoundRoot getRoot() { } /** - * @see com.opensymphony.xwork2.util.ValueStack#setParameter(String, Object) + * @see org.apache.struts2.util.ValueStack#setParameter(String, Object) */ @Override public void setParameter(String expr, Object value) { @@ -200,7 +200,7 @@ public void setParameter(String expr, Object value) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#setValue(java.lang.String, java.lang.Object) + * @see org.apache.struts2.util.ValueStack#setValue(java.lang.String, java.lang.Object) */ @Override public void setValue(String expr, Object value) { @@ -208,7 +208,7 @@ public void setValue(String expr, Object value) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#setValue(java.lang.String, java.lang.Object, boolean) + * @see org.apache.struts2.util.ValueStack#setValue(java.lang.String, java.lang.Object, boolean) */ @Override public void setValue(String expr, Object value, boolean throwExceptionOnFailure) { @@ -266,7 +266,7 @@ protected void handleOgnlException(String expr, Object value, boolean throwExcep } /** - * @see com.opensymphony.xwork2.util.ValueStack#findString(java.lang.String) + * @see org.apache.struts2.util.ValueStack#findString(java.lang.String) */ @Override public String findString(String expr) { @@ -279,7 +279,7 @@ public String findString(String expr, boolean throwExceptionOnFailure) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#findValue(java.lang.String) + * @see org.apache.struts2.util.ValueStack#findValue(java.lang.String) */ @Override public Object findValue(String expr, boolean throwExceptionOnFailure) { @@ -334,7 +334,7 @@ public Object findValue(String expr) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#findValue(java.lang.String, java.lang.Class) + * @see org.apache.struts2.util.ValueStack#findValue(java.lang.String, java.lang.Class) */ @Override public Object findValue(String expr, Class asType, boolean throwExceptionOnFailure) { @@ -427,7 +427,7 @@ private void logLookupFailure(String expr, Exception e) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#peek() + * @see org.apache.struts2.util.ValueStack#peek() */ @Override public Object peek() { @@ -435,7 +435,7 @@ public Object peek() { } /** - * @see com.opensymphony.xwork2.util.ValueStack#pop() + * @see org.apache.struts2.util.ValueStack#pop() */ @Override public Object pop() { @@ -443,7 +443,7 @@ public Object pop() { } /** - * @see com.opensymphony.xwork2.util.ValueStack#push(java.lang.Object) + * @see org.apache.struts2.util.ValueStack#push(java.lang.Object) */ @Override public void push(Object o) { @@ -451,7 +451,7 @@ public void push(Object o) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#set(java.lang.String, java.lang.Object) + * @see org.apache.struts2.util.ValueStack#set(java.lang.String, java.lang.Object) */ @Override public void set(String key, Object o) { @@ -481,7 +481,7 @@ private boolean shouldUseOldMap(Object topObj) { } /** - * @see com.opensymphony.xwork2.util.ValueStack#size() + * @see org.apache.struts2.util.ValueStack#size() */ @Override public int size() { @@ -489,7 +489,7 @@ public int size() { } /** - * Retained for serializability - see {@link com.opensymphony.xwork2.ognl.OgnlValueStackTest#testSerializable} + * Retained for serializability - see {@link org.apache.struts2.ognl.OgnlValueStackTest#testSerializable} */ private Object readResolve() { // TODO: this should be done better diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStackFactory.java b/core/src/main/java/org/apache/struts2/ognl/OgnlValueStackFactory.java similarity index 92% rename from core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStackFactory.java rename to core/src/main/java/org/apache/struts2/ognl/OgnlValueStackFactory.java index 137889110a..ec32f89860 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStackFactory.java +++ b/core/src/main/java/org/apache/struts2/ognl/OgnlValueStackFactory.java @@ -16,17 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; - -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.conversion.NullHandler; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.accessor.RootAccessor; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; +package org.apache.struts2.ognl; + +import org.apache.struts2.TextProvider; +import org.apache.struts2.conversion.NullHandler; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.accessor.RootAccessor; +import org.apache.struts2.util.CompoundRoot; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; import ognl.MethodAccessor; import ognl.OgnlRuntime; import ognl.PropertyAccessor; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java b/core/src/main/java/org/apache/struts2/ognl/SecurityMemberAccess.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java rename to core/src/main/java/org/apache/struts2/ognl/SecurityMemberAccess.java index 4cd62292d7..45a291d2f8 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java +++ b/core/src/main/java/org/apache/struts2/ognl/SecurityMemberAccess.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ProxyUtil; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ProxyUtil; import ognl.MemberAccess; import org.apache.commons.lang3.BooleanUtils; import org.apache.logging.log4j.LogManager; @@ -40,13 +40,13 @@ import java.util.regex.Pattern; import java.util.stream.IntStream; -import static com.opensymphony.xwork2.util.ConfigParseUtil.toClassObjectsSet; -import static com.opensymphony.xwork2.util.ConfigParseUtil.toClassesSet; -import static com.opensymphony.xwork2.util.ConfigParseUtil.toNewClassesSet; -import static com.opensymphony.xwork2.util.ConfigParseUtil.toNewPackageNamesSet; -import static com.opensymphony.xwork2.util.ConfigParseUtil.toNewPatternsSet; -import static com.opensymphony.xwork2.util.ConfigParseUtil.toPackageNamesSet; -import static com.opensymphony.xwork2.util.DebugUtils.logWarningForFirstOccurrence; +import static org.apache.struts2.util.ConfigParseUtil.toClassObjectsSet; +import static org.apache.struts2.util.ConfigParseUtil.toClassesSet; +import static org.apache.struts2.util.ConfigParseUtil.toNewClassesSet; +import static org.apache.struts2.util.ConfigParseUtil.toNewPackageNamesSet; +import static org.apache.struts2.util.ConfigParseUtil.toNewPatternsSet; +import static org.apache.struts2.util.ConfigParseUtil.toPackageNamesSet; +import static org.apache.struts2.util.DebugUtils.logWarningForFirstOccurrence; import static java.text.MessageFormat.format; import static java.util.Collections.emptySet; import static org.apache.struts2.StrutsConstants.STRUTS_ALLOWLIST_CLASSES; @@ -61,7 +61,7 @@ public class SecurityMemberAccess implements MemberAccess { private static final Logger LOG = LogManager.getLogger(SecurityMemberAccess.class); private static final Set ALLOWLIST_REQUIRED_PACKAGES = Set.of( - "com.opensymphony.xwork2.validator.validators", + "org.apache.struts2.validator.validators", "org.apache.struts2.components", "org.apache.struts2.views.jsp" ); diff --git a/core/src/main/java/org/apache/struts2/ognl/StrutsOgnlGuard.java b/core/src/main/java/org/apache/struts2/ognl/StrutsOgnlGuard.java index 0cb4d1d930..f46246d3b9 100644 --- a/core/src/main/java/org/apache/struts2/ognl/StrutsOgnlGuard.java +++ b/core/src/main/java/org/apache/struts2/ognl/StrutsOgnlGuard.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.ognl; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.inject.Inject; import ognl.Node; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -28,7 +28,7 @@ import java.util.HashSet; import java.util.Set; -import static com.opensymphony.xwork2.util.TextParseUtil.commaDelimitedStringToSet; +import static org.apache.struts2.util.TextParseUtil.commaDelimitedStringToSet; import static java.util.Collections.emptySet; import static java.util.Collections.unmodifiableSet; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/XWorkTypeConverterWrapper.java b/core/src/main/java/org/apache/struts2/ognl/XWorkTypeConverterWrapper.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/ognl/XWorkTypeConverterWrapper.java rename to core/src/main/java/org/apache/struts2/ognl/XWorkTypeConverterWrapper.java index e3abca8013..21eef09e72 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/XWorkTypeConverterWrapper.java +++ b/core/src/main/java/org/apache/struts2/ognl/XWorkTypeConverterWrapper.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl; +package org.apache.struts2.ognl; -import com.opensymphony.xwork2.conversion.TypeConverter; +import org.apache.struts2.conversion.TypeConverter; import java.lang.reflect.Member; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/CompoundRootAccessor.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/CompoundRootAccessor.java index 2f9333069c..b40ff02193 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/CompoundRootAccessor.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.OgnlValueStack; -import com.opensymphony.xwork2.util.CompoundRoot; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.OgnlValueStack; +import org.apache.struts2.util.CompoundRoot; +import org.apache.struts2.util.ValueStack; import ognl.MethodFailedException; import ognl.NoSuchPropertyException; import ognl.Ognl; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/HttpParametersPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/HttpParametersPropertyAccessor.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/HttpParametersPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/HttpParametersPropertyAccessor.java index 40fe62a0bb..6f1216b8cd 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/HttpParametersPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/HttpParametersPropertyAccessor.java @@ -16,12 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; import ognl.ObjectPropertyAccessor; import ognl.OgnlException; import org.apache.struts2.dispatcher.HttpParameters; -import org.apache.struts2.dispatcher.Parameter; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/ObjectAccessor.java similarity index 86% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/ObjectAccessor.java index 2edf89f296..a8cabd7e10 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/ObjectAccessor.java @@ -16,11 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.ognl.OgnlValueStack; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.ObjectPropertyAccessor; import ognl.OgnlException; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectProxyPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/ObjectProxyPropertyAccessor.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectProxyPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/ObjectProxyPropertyAccessor.java index 5f5ccb7994..e57c55a84d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectProxyPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/ObjectProxyPropertyAccessor.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; -import com.opensymphony.xwork2.ognl.ObjectProxy; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +import org.apache.struts2.ognl.ObjectProxy; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.OgnlContext; import ognl.OgnlException; import ognl.OgnlRuntime; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ParameterPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/ParameterPropertyAccessor.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ParameterPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/ParameterPropertyAccessor.java index 659b709833..f7e4fb102c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ParameterPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/ParameterPropertyAccessor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; import ognl.ObjectPropertyAccessor; import ognl.OgnlException; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/RootAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/RootAccessor.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/RootAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/RootAccessor.java index 481bf2f751..50e9feea00 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/RootAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/RootAccessor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; import ognl.ClassResolver; import ognl.MethodAccessor; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkCollectionPropertyAccessor.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/XWorkCollectionPropertyAccessor.java index 2d3581e143..d416785a5d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkCollectionPropertyAccessor.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; - -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.OgnlUtil; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +package org.apache.struts2.ognl.accessor; + +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.OgnlUtil; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.ObjectPropertyAccessor; import ognl.OgnlException; import ognl.OgnlRuntime; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkEnumerationAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkEnumerationAccessor.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkEnumerationAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/XWorkEnumerationAccessor.java index d0d713aa30..cad0c7cd88 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkEnumerationAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkEnumerationAccessor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; import ognl.EnumerationPropertyAccessor; import ognl.ObjectPropertyAccessor; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkIteratorPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkIteratorPropertyAccessor.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkIteratorPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/XWorkIteratorPropertyAccessor.java index 89796080c5..acd7c52d21 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkIteratorPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkIteratorPropertyAccessor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; import ognl.IteratorPropertyAccessor; import ognl.ObjectPropertyAccessor; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkListPropertyAccessor.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/XWorkListPropertyAccessor.java index 9bc0df14a3..1ec2a2d7c2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkListPropertyAccessor.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; - -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.ognl.OgnlUtil; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +package org.apache.struts2.ognl.accessor; + +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.ognl.OgnlUtil; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.ListPropertyAccessor; import ognl.OgnlException; import ognl.PropertyAccessor; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMapPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkMapPropertyAccessor.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMapPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/XWorkMapPropertyAccessor.java index db8ec65491..6c1cf0419b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMapPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkMapPropertyAccessor.java @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.conversion.ObjectTypeDeterminer; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.MapPropertyAccessor; import ognl.OgnlException; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMethodAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkMethodAccessor.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMethodAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/XWorkMethodAccessor.java index f6e51d4fc1..70730c4cad 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkMethodAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkMethodAccessor.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.MethodFailedException; import ognl.ObjectMethodAccessor; import ognl.OgnlContext; diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkObjectPropertyAccessor.java b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkObjectPropertyAccessor.java similarity index 89% rename from core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkObjectPropertyAccessor.java rename to core/src/main/java/org/apache/struts2/ognl/accessor/XWorkObjectPropertyAccessor.java index e719b1e4e6..0d364bf540 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkObjectPropertyAccessor.java +++ b/core/src/main/java/org/apache/struts2/ognl/accessor/XWorkObjectPropertyAccessor.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.ognl.accessor; +package org.apache.struts2.ognl.accessor; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.util.reflection.ReflectionContextState; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.util.reflection.ReflectionContextState; import ognl.ObjectPropertyAccessor; import ognl.OgnlException; diff --git a/core/src/main/java/com/opensymphony/xwork2/package.html b/core/src/main/java/org/apache/struts2/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/package.html rename to core/src/main/java/org/apache/struts2/package.html diff --git a/core/src/main/java/org/apache/struts2/result/HttpHeaderResult.java b/core/src/main/java/org/apache/struts2/result/HttpHeaderResult.java index 4251ec3dc6..4895bbc908 100644 --- a/core/src/main/java/org/apache/struts2/result/HttpHeaderResult.java +++ b/core/src/main/java/org/apache/struts2/result/HttpHeaderResult.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.Result; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.ValueStack; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/result/ParamNameAwareResult.java b/core/src/main/java/org/apache/struts2/result/ParamNameAwareResult.java similarity index 88% rename from core/src/main/java/com/opensymphony/xwork2/result/ParamNameAwareResult.java rename to core/src/main/java/org/apache/struts2/result/ParamNameAwareResult.java index 0b80312d06..d3438e6dfa 100644 --- a/core/src/main/java/com/opensymphony/xwork2/result/ParamNameAwareResult.java +++ b/core/src/main/java/org/apache/struts2/result/ParamNameAwareResult.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.result; +package org.apache.struts2.result; /** - * Accept parameter name/value to be set on {@link com.opensymphony.xwork2.Result} + * Accept parameter name/value to be set on {@link org.apache.struts2.Result} */ public interface ParamNameAwareResult { diff --git a/core/src/main/java/org/apache/struts2/result/PlainResult.java b/core/src/main/java/org/apache/struts2/result/PlainResult.java index fba2cc2e7c..160e97ba83 100644 --- a/core/src/main/java/org/apache/struts2/result/PlainResult.java +++ b/core/src/main/java/org/apache/struts2/result/PlainResult.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.Result; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.Result; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; diff --git a/core/src/main/java/org/apache/struts2/result/PlainTextResult.java b/core/src/main/java/org/apache/struts2/result/PlainTextResult.java index d15d46bdf5..30d1500a55 100644 --- a/core/src/main/java/org/apache/struts2/result/PlainTextResult.java +++ b/core/src/main/java/org/apache/struts2/result/PlainTextResult.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionInvocation; +import org.apache.struts2.ActionInvocation; import jakarta.servlet.ServletContext; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; @@ -92,9 +92,6 @@ public void setCharSet(String charSet) { this.charSet = charSet; } - /* (non-Javadoc) - * @see org.apache.struts2.result.StrutsResultSupport#doExecute(java.lang.String, com.opensymphony.xwork2.ActionInvocation) - */ protected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception { // verify charset Charset charset = readCharset(); diff --git a/core/src/main/java/org/apache/struts2/result/PostbackResult.java b/core/src/main/java/org/apache/struts2/result/PostbackResult.java index 44f9abf383..f46f7c52c3 100644 --- a/core/src/main/java/org/apache/struts2/result/PostbackResult.java +++ b/core/src/main/java/org/apache/struts2/result/PostbackResult.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.inject.Inject; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.struts2.dispatcher.mapper.ActionMapper; diff --git a/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java b/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java index e20ba8342d..5de96b1308 100644 --- a/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java +++ b/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.util.reflection.ReflectionExceptionHandler; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.util.reflection.ReflectionExceptionHandler; import org.apache.struts2.dispatcher.mapper.ActionMapper; import org.apache.struts2.dispatcher.mapper.ActionMapping; @@ -156,7 +156,7 @@ public ServletActionRedirectResult(String namespace, String actionName, String m } /** - * @see com.opensymphony.xwork2.Result#execute(com.opensymphony.xwork2.ActionInvocation) + * @see org.apache.struts2.Result#execute(org.apache.struts2.ActionInvocation) */ public void execute(ActionInvocation invocation) throws Exception { if (invocation == null) { diff --git a/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java b/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java index df0896cf41..d50ebadf57 100644 --- a/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java +++ b/core/src/main/java/org/apache/struts2/result/ServletDispatcherResult.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.inject.Inject; import jakarta.servlet.RequestDispatcher; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/result/ServletRedirectResult.java b/core/src/main/java/org/apache/struts2/result/ServletRedirectResult.java index cb050b8cde..7bc8ab616d 100644 --- a/core/src/main/java/org/apache/struts2/result/ServletRedirectResult.java +++ b/core/src/main/java/org/apache/struts2/result/ServletRedirectResult.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.reflection.ReflectionException; -import com.opensymphony.xwork2.util.reflection.ReflectionExceptionHandler; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.config.entities.ResultConfig; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.reflection.ReflectionException; +import org.apache.struts2.util.reflection.ReflectionExceptionHandler; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/org/apache/struts2/result/StreamResult.java b/core/src/main/java/org/apache/struts2/result/StreamResult.java index 3ee2b659e2..2a6611ec77 100644 --- a/core/src/main/java/org/apache/struts2/result/StreamResult.java +++ b/core/src/main/java/org/apache/struts2/result/StreamResult.java @@ -18,9 +18,9 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.security.NotExcludedAcceptedPatternsChecker; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.security.NotExcludedAcceptedPatternsChecker; import jakarta.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -207,7 +207,7 @@ public void setInputName(String inputName) { } /** - * @see StrutsResultSupport#doExecute(java.lang.String, com.opensymphony.xwork2.ActionInvocation) + * @see StrutsResultSupport#doExecute(java.lang.String, ActionInvocation) */ protected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception { LOG.debug("Find the Response in context"); diff --git a/core/src/main/java/org/apache/struts2/result/StrutsResultSupport.java b/core/src/main/java/org/apache/struts2/result/StrutsResultSupport.java index 2ec5e987f3..12c278a296 100644 --- a/core/src/main/java/org/apache/struts2/result/StrutsResultSupport.java +++ b/core/src/main/java/org/apache/struts2/result/StrutsResultSupport.java @@ -18,12 +18,12 @@ */ package org.apache.struts2.result; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.util.TextParseUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.Result; import org.apache.struts2.StrutsStatics; +import org.apache.struts2.util.TextParseUtil; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; @@ -44,7 +44,7 @@ *
      *
    • location - the location to go to after execution (could be a jsp page or another action). * It can be parsed as per the rules definied in the - * {@link TextParseUtil#translateVariables(java.lang.String, com.opensymphony.xwork2.util.ValueStack) translateVariables} + * {@link TextParseUtil#translateVariables(java.lang.String, org.apache.struts2.util.ValueStack) translateVariables} * method
    • *
    • parse - true by default. If set to false, the location param will not be parsed for expressions
    • *
    • encode - false by default. If set to false, the location param will not be url encoded. This only have effect when parse is true
    • @@ -106,11 +106,11 @@ * * *

      - * Please see the {@link com.opensymphony.xwork2.Result} class for more info on Results in general. + * Please see the {@link org.apache.struts2.Result} class for more info on Results in general. *

      * * - * @see com.opensymphony.xwork2.Result + * @see org.apache.struts2.Result */ public abstract class StrutsResultSupport implements Result, StrutsStatics { @@ -204,7 +204,7 @@ public void setEncode(boolean encode) { @Override public void execute(ActionInvocation invocation) throws Exception { lastFinalLocation = parseLocation ? conditionalParse(location, invocation) : location; - doExecute(lastFinalLocation, (org.apache.struts2.ActionInvocation) invocation); + doExecute(lastFinalLocation, invocation); } /** @@ -250,9 +250,8 @@ protected Collection conditionalParseCollection(String param, ActionInvo } /** - * {@link com.opensymphony.xwork2.util.TextParseUtil.ParsedValueEvaluator} to do URL encoding for found values. To be + * {@link org.apache.struts2.util.TextParseUtil.ParsedValueEvaluator} to do URL encoding for found values. To be * used for single strings or collections. - * */ private final class EncodingParsedValueEvaluator implements TextParseUtil.ParsedValueEvaluator { @Override @@ -271,13 +270,6 @@ public Object evaluate(String parsedValue) { } } - /** - * @deprecated since 6.7.0, override {@link #doExecute(String, org.apache.struts2.ActionInvocation)} instead. - */ - @Deprecated - protected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception { - } - /** * Executes the result given a final location (jsp page, action, etc) and the action invocation * (the state in which the action was executed). Subclasses must implement this class to handle @@ -287,7 +279,5 @@ protected void doExecute(String finalLocation, ActionInvocation invocation) thro * @param invocation the execution state of the action. * @throws Exception if an error occurs while executing the result. */ - protected void doExecute(String finalLocation, org.apache.struts2.ActionInvocation invocation) throws Exception { - doExecute(finalLocation, ActionInvocation.adapt(invocation)); - } + protected abstract void doExecute(String finalLocation, ActionInvocation invocation) throws Exception; } diff --git a/core/src/main/java/com/opensymphony/xwork2/security/AcceptedPatternsChecker.java b/core/src/main/java/org/apache/struts2/security/AcceptedPatternsChecker.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/security/AcceptedPatternsChecker.java rename to core/src/main/java/org/apache/struts2/security/AcceptedPatternsChecker.java index 4af56ff9e1..874c665570 100644 --- a/core/src/main/java/com/opensymphony/xwork2/security/AcceptedPatternsChecker.java +++ b/core/src/main/java/org/apache/struts2/security/AcceptedPatternsChecker.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.security; +package org.apache.struts2.security; import java.util.Set; import java.util.regex.Pattern; diff --git a/core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java b/core/src/main/java/org/apache/struts2/security/DefaultAcceptedPatternsChecker.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java rename to core/src/main/java/org/apache/struts2/security/DefaultAcceptedPatternsChecker.java index 82cc4af877..f6e2ad4870 100644 --- a/core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java +++ b/core/src/main/java/org/apache/struts2/security/DefaultAcceptedPatternsChecker.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.security; +package org.apache.struts2.security; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.TextParseUtil; import org.apache.commons.lang3.BooleanUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java b/core/src/main/java/org/apache/struts2/security/DefaultExcludedPatternsChecker.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java rename to core/src/main/java/org/apache/struts2/security/DefaultExcludedPatternsChecker.java index cf425d67cb..824d98c58a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java +++ b/core/src/main/java/org/apache/struts2/security/DefaultExcludedPatternsChecker.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.security; +package org.apache.struts2.security; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.TextParseUtil; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.TextParseUtil; import org.apache.commons.lang3.BooleanUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/security/DefaultNotExcludedAcceptedPatternsChecker.java b/core/src/main/java/org/apache/struts2/security/DefaultNotExcludedAcceptedPatternsChecker.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/security/DefaultNotExcludedAcceptedPatternsChecker.java rename to core/src/main/java/org/apache/struts2/security/DefaultNotExcludedAcceptedPatternsChecker.java index b475da1d06..f9e48237fe 100644 --- a/core/src/main/java/com/opensymphony/xwork2/security/DefaultNotExcludedAcceptedPatternsChecker.java +++ b/core/src/main/java/org/apache/struts2/security/DefaultNotExcludedAcceptedPatternsChecker.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.security; +package org.apache.struts2.security; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import java.util.Set; import java.util.regex.Pattern; diff --git a/core/src/main/java/com/opensymphony/xwork2/security/ExcludedPatternsChecker.java b/core/src/main/java/org/apache/struts2/security/ExcludedPatternsChecker.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/security/ExcludedPatternsChecker.java rename to core/src/main/java/org/apache/struts2/security/ExcludedPatternsChecker.java index 086c75d0b6..d44156c18a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/security/ExcludedPatternsChecker.java +++ b/core/src/main/java/org/apache/struts2/security/ExcludedPatternsChecker.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.security; +package org.apache.struts2.security; import java.util.Set; import java.util.regex.Pattern; diff --git a/core/src/main/java/com/opensymphony/xwork2/security/NotExcludedAcceptedPatternsChecker.java b/core/src/main/java/org/apache/struts2/security/NotExcludedAcceptedPatternsChecker.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/security/NotExcludedAcceptedPatternsChecker.java rename to core/src/main/java/org/apache/struts2/security/NotExcludedAcceptedPatternsChecker.java index 48cd22caea..e610484318 100644 --- a/core/src/main/java/com/opensymphony/xwork2/security/NotExcludedAcceptedPatternsChecker.java +++ b/core/src/main/java/org/apache/struts2/security/NotExcludedAcceptedPatternsChecker.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.security; +package org.apache.struts2.security; /** * Used across different places to check if given string is not excluded and is accepted diff --git a/core/src/main/java/com/opensymphony/xwork2/test/StubConfigurationProvider.java b/core/src/main/java/org/apache/struts2/test/StubConfigurationProvider.java similarity index 82% rename from core/src/main/java/com/opensymphony/xwork2/test/StubConfigurationProvider.java rename to core/src/main/java/org/apache/struts2/test/StubConfigurationProvider.java index 73ef890dbe..47cd0c5b7c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/test/StubConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/test/StubConfigurationProvider.java @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.test; +package org.apache.struts2.test; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.ConfigurationProvider; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.config.Configuration; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.ConfigurationProvider; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.util.location.LocatableProperties; public class StubConfigurationProvider implements ConfigurationProvider { diff --git a/core/src/main/java/org/apache/struts2/url/StrutsQueryStringBuilder.java b/core/src/main/java/org/apache/struts2/url/StrutsQueryStringBuilder.java index 72a0cb5207..8885ae1b9a 100644 --- a/core/src/main/java/org/apache/struts2/url/StrutsQueryStringBuilder.java +++ b/core/src/main/java/org/apache/struts2/url/StrutsQueryStringBuilder.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.url; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java b/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java index 792ddb0d56..9d697630af 100644 --- a/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java +++ b/core/src/main/java/org/apache/struts2/url/StrutsQueryStringParser.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.url; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java b/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java index 656a2b85fa..384cd63a62 100644 --- a/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java +++ b/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.url; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/url/StrutsUrlEncoder.java b/core/src/main/java/org/apache/struts2/url/StrutsUrlEncoder.java index 12b5a0104b..143daca627 100644 --- a/core/src/main/java/org/apache/struts2/url/StrutsUrlEncoder.java +++ b/core/src/main/java/org/apache/struts2/url/StrutsUrlEncoder.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.url; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java b/core/src/main/java/org/apache/struts2/util/AbstractLocalizedTextProvider.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java rename to core/src/main/java/org/apache/struts2/util/AbstractLocalizedTextProvider.java index 9eb978a049..316cbb99ed 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java +++ b/core/src/main/java/org/apache/struts2/util/AbstractLocalizedTextProvider.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.ActionContext; +import org.apache.struts2.LocalizedTextProvider; +import org.apache.struts2.inject.Inject; import org.apache.commons.lang3.ObjectUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -47,14 +47,14 @@ abstract class AbstractLocalizedTextProvider implements LocalizedTextProvider { private static final Logger LOG = LogManager.getLogger(AbstractLocalizedTextProvider.class); - public static final String XWORK_MESSAGES_BUNDLE = "com/opensymphony/xwork2/xwork-messages"; + public static final String XWORK_MESSAGES_BUNDLE = "org/apache/struts2/xwork-messages"; public static final String STRUTS_MESSAGES_BUNDLE = "org/apache/struts2/struts-messages"; private static final String TOMCAT_RESOURCE_ENTRIES_FIELD = "resourceEntries"; private static final String TOMCAT_PARALLEL_WEBAPP_CLASSLOADER = "org.apache.catalina.loader.ParallelWebappClassLoader"; private static final String TOMCAT_WEBAPP_CLASSLOADER = "org.apache.catalina.loader.WebappClassLoader"; private static final String TOMCAT_WEBAPP_CLASSLOADER_BASE = "org.apache.catalina.loader.WebappClassLoaderBase"; - private static final String RELOADED = "com.opensymphony.xwork2.util.LocalizedTextProvider.reloaded"; + private static final String RELOADED = "org.apache.struts2.util.LocalizedTextProvider.reloaded"; protected final ConcurrentMap bundlesMap = new ConcurrentHashMap<>(); protected boolean devMode = false; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java b/core/src/main/java/org/apache/struts2/util/AnnotationUtils.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java rename to core/src/main/java/org/apache/struts2/util/AnnotationUtils.java index 2ab1f91922..0c607f2549 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java +++ b/core/src/main/java/org/apache/struts2/util/AnnotationUtils.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ClassUtils; diff --git a/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java b/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java index 211276956e..fafbadb754 100644 --- a/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java +++ b/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; import java.util.ArrayList; import java.util.Iterator; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java b/core/src/main/java/org/apache/struts2/util/ClassLoaderUtil.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java rename to core/src/main/java/org/apache/struts2/util/ClassLoaderUtil.java index b1d132fa68..f18b0b6db7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java +++ b/core/src/main/java/org/apache/struts2/util/ClassLoaderUtil.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java b/core/src/main/java/org/apache/struts2/util/ClassPathFinder.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java rename to core/src/main/java/org/apache/struts2/util/ClassPathFinder.java index 1b97bf517c..3b5228ab23 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java +++ b/core/src/main/java/org/apache/struts2/util/ClassPathFinder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -38,8 +38,8 @@ /** * This class is an utility class that will search through the classpath * for files whose names match the given pattern. The filename is tested - * using the given implementation of {@link com.opensymphony.xwork2.util.PatternMatcher} by default it - * uses {@link com.opensymphony.xwork2.util.WildcardHelper} + * using the given implementation of {@link PatternMatcher} by default it + * uses {@link WildcardHelper} */ public class ClassPathFinder { diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ClearableValueStack.java b/core/src/main/java/org/apache/struts2/util/ClearableValueStack.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/ClearableValueStack.java rename to core/src/main/java/org/apache/struts2/util/ClearableValueStack.java index 7cb09ce13f..4cc13b8134 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ClearableValueStack.java +++ b/core/src/main/java/org/apache/struts2/util/ClearableValueStack.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; /** * ValueStacks implementing this interface provide a way to remove values from diff --git a/core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java b/core/src/main/java/org/apache/struts2/util/CompoundRoot.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java rename to core/src/main/java/org/apache/struts2/util/CompoundRoot.java index dbfd71fce8..aba7ed3be2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java +++ b/core/src/main/java/org/apache/struts2/util/CompoundRoot.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.io.Serial; import java.util.List; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ConfigParseUtil.java b/core/src/main/java/org/apache/struts2/util/ConfigParseUtil.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/util/ConfigParseUtil.java rename to core/src/main/java/org/apache/struts2/util/ConfigParseUtil.java index 4617286a2d..d6cdafabf3 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ConfigParseUtil.java +++ b/core/src/main/java/org/apache/struts2/util/ConfigParseUtil.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.ognl.OgnlUtil; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.ognl.OgnlUtil; import java.util.Collection; import java.util.HashSet; @@ -27,7 +27,7 @@ import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; -import static com.opensymphony.xwork2.util.TextParseUtil.commaDelimitedStringToSet; +import static org.apache.struts2.util.TextParseUtil.commaDelimitedStringToSet; import static java.util.Collections.unmodifiableSet; import static java.util.stream.Collectors.toSet; import static org.apache.commons.lang3.StringUtils.strip; diff --git a/core/src/main/java/org/apache/struts2/util/ContentTypeMatcher.java b/core/src/main/java/org/apache/struts2/util/ContentTypeMatcher.java index 15c4362d79..49ed1e844e 100644 --- a/core/src/main/java/org/apache/struts2/util/ContentTypeMatcher.java +++ b/core/src/main/java/org/apache/struts2/util/ContentTypeMatcher.java @@ -21,7 +21,7 @@ import java.util.Map; /** - * Matches content type of uploaded files, similar to {@link com.opensymphony.xwork2.util.PatternMatcher} + * Matches content type of uploaded files, similar to {@link org.apache.struts2.util.PatternMatcher} * * @since 2.3.22 */ diff --git a/core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java b/core/src/main/java/org/apache/struts2/util/CreateIfNull.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java rename to core/src/main/java/org/apache/struts2/util/CreateIfNull.java index 9d7d06d723..1913b4e927 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java +++ b/core/src/main/java/org/apache/struts2/util/CreateIfNull.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/DebugUtils.java b/core/src/main/java/org/apache/struts2/util/DebugUtils.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/util/DebugUtils.java rename to core/src/main/java/org/apache/struts2/util/DebugUtils.java index 6838d01137..099f701710 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/DebugUtils.java +++ b/core/src/main/java/org/apache/struts2/util/DebugUtils.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.TextProvider; -import org.apache.logging.log4j.Logger; +import org.apache.struts2.TextProvider; import org.apache.struts2.interceptor.ValidationAware; +import org.apache.logging.log4j.Logger; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; diff --git a/core/src/main/java/org/apache/struts2/util/DefaultContentTypeMatcher.java b/core/src/main/java/org/apache/struts2/util/DefaultContentTypeMatcher.java index 78e4e8b260..df2fedac9f 100644 --- a/core/src/main/java/org/apache/struts2/util/DefaultContentTypeMatcher.java +++ b/core/src/main/java/org/apache/struts2/util/DefaultContentTypeMatcher.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.util.PatternMatcher; -import com.opensymphony.xwork2.util.WildcardHelper; +import org.apache.struts2.util.PatternMatcher; +import org.apache.struts2.util.WildcardHelper; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java b/core/src/main/java/org/apache/struts2/util/DomHelper.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java rename to core/src/main/java/org/apache/struts2/util/DomHelper.java index f2d809fae5..751da93c09 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java +++ b/core/src/main/java/org/apache/struts2/util/DomHelper.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.util.location.Location; -import com.opensymphony.xwork2.util.location.LocationAttributes; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.util.location.Location; +import org.apache.struts2.util.location.LocationAttributes; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/Element.java b/core/src/main/java/org/apache/struts2/util/Element.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/Element.java rename to core/src/main/java/org/apache/struts2/util/Element.java index 50fd3a9acc..80ef7cb68a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/Element.java +++ b/core/src/main/java/org/apache/struts2/util/Element.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/Evaluated.java b/core/src/main/java/org/apache/struts2/util/Evaluated.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/Evaluated.java rename to core/src/main/java/org/apache/struts2/util/Evaluated.java index 8ecb657336..a8baaa8224 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/Evaluated.java +++ b/core/src/main/java/org/apache/struts2/util/Evaluated.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; public class Evaluated { diff --git a/core/src/main/java/com/opensymphony/xwork2/util/GlobalLocalizedTextProvider.java b/core/src/main/java/org/apache/struts2/util/GlobalLocalizedTextProvider.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/GlobalLocalizedTextProvider.java rename to core/src/main/java/org/apache/struts2/util/GlobalLocalizedTextProvider.java index d86682fd12..620aa29120 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/GlobalLocalizedTextProvider.java +++ b/core/src/main/java/org/apache/struts2/util/GlobalLocalizedTextProvider.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; +import org.apache.struts2.ActionContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -27,7 +27,7 @@ /** * Provides support for localization in the framework, it can be used to read only default bundles. - * + * * Note that unlike {@link StrutsLocalizedTextProvider}, this class {@link GlobalLocalizedTextProvider} will * only search the default bundles for localized text. */ diff --git a/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java b/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java index 4a1c36fbfb..62dd9e185e 100644 --- a/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java +++ b/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; import java.io.Serial; import java.io.Serializable; diff --git a/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java b/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java index 493980e64a..b193d6ad1b 100644 --- a/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java +++ b/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/Key.java b/core/src/main/java/org/apache/struts2/util/Key.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/Key.java rename to core/src/main/java/org/apache/struts2/util/Key.java index 23559ea5f3..e704038494 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/Key.java +++ b/core/src/main/java/org/apache/struts2/util/Key.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java b/core/src/main/java/org/apache/struts2/util/KeyProperty.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java rename to core/src/main/java/org/apache/struts2/util/KeyProperty.java index 88fb006aed..62b24ee520 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java +++ b/core/src/main/java/org/apache/struts2/util/KeyProperty.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java b/core/src/main/java/org/apache/struts2/util/MemberAccessValueStack.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java rename to core/src/main/java/org/apache/struts2/util/MemberAccessValueStack.java index 95606b1d52..d1de8dc765 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java +++ b/core/src/main/java/org/apache/struts2/util/MemberAccessValueStack.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.util.Set; import java.util.regex.Pattern; diff --git a/core/src/main/java/org/apache/struts2/util/MergeIteratorFilter.java b/core/src/main/java/org/apache/struts2/util/MergeIteratorFilter.java index 0d8ea28f43..0f00ec56b3 100644 --- a/core/src/main/java/org/apache/struts2/util/MergeIteratorFilter.java +++ b/core/src/main/java/org/apache/struts2/util/MergeIteratorFilter.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; import java.util.ArrayList; import java.util.Iterator; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/NamedVariablePatternMatcher.java b/core/src/main/java/org/apache/struts2/util/NamedVariablePatternMatcher.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/NamedVariablePatternMatcher.java rename to core/src/main/java/org/apache/struts2/util/NamedVariablePatternMatcher.java index 16ac9a2fbd..03a56ee3b7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/NamedVariablePatternMatcher.java +++ b/core/src/main/java/org/apache/struts2/util/NamedVariablePatternMatcher.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/OgnlTextParser.java b/core/src/main/java/org/apache/struts2/util/OgnlTextParser.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/OgnlTextParser.java rename to core/src/main/java/org/apache/struts2/util/OgnlTextParser.java index e4708cddb6..9d83dddfac 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/OgnlTextParser.java +++ b/core/src/main/java/org/apache/struts2/util/OgnlTextParser.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/PatternMatcher.java b/core/src/main/java/org/apache/struts2/util/PatternMatcher.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/PatternMatcher.java rename to core/src/main/java/org/apache/struts2/util/PatternMatcher.java index e57a74b36f..788d40101f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/PatternMatcher.java +++ b/core/src/main/java/org/apache/struts2/util/PatternMatcher.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/PropertiesReader.java b/core/src/main/java/org/apache/struts2/util/PropertiesReader.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/PropertiesReader.java rename to core/src/main/java/org/apache/struts2/util/PropertiesReader.java index bc1ef413f9..d135bea62e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/PropertiesReader.java +++ b/core/src/main/java/org/apache/struts2/util/PropertiesReader.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ProxyUtil.java b/core/src/main/java/org/apache/struts2/util/ProxyUtil.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/ProxyUtil.java rename to core/src/main/java/org/apache/struts2/util/ProxyUtil.java index 895cfb7eec..392bb9a0b2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ProxyUtil.java +++ b/core/src/main/java/org/apache/struts2/util/ProxyUtil.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.ognl.DefaultOgnlCacheFactory; -import com.opensymphony.xwork2.ognl.OgnlCache; -import com.opensymphony.xwork2.ognl.OgnlCacheFactory; +import org.apache.struts2.ognl.DefaultOgnlCacheFactory; +import org.apache.struts2.ognl.OgnlCache; +import org.apache.struts2.ognl.OgnlCacheFactory; import org.apache.commons.lang3.reflect.ConstructorUtils; import org.apache.commons.lang3.reflect.FieldUtils; import org.apache.commons.lang3.reflect.MethodUtils; diff --git a/core/src/main/java/org/apache/struts2/util/RegexPatternMatcher.java b/core/src/main/java/org/apache/struts2/util/RegexPatternMatcher.java index cafb6dfca4..e1e9c2401b 100644 --- a/core/src/main/java/org/apache/struts2/util/RegexPatternMatcher.java +++ b/core/src/main/java/org/apache/struts2/util/RegexPatternMatcher.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.util.PatternMatcher; +import org.apache.struts2.util.PatternMatcher; import org.apache.commons.lang3.StringUtils; import java.util.HashMap; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java b/core/src/main/java/org/apache/struts2/util/ResolverUtil.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java rename to core/src/main/java/org/apache/struts2/util/ResolverUtil.java index 3b7e3716f0..bfe98ff6f9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java +++ b/core/src/main/java/org/apache/struts2/util/ResolverUtil.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -48,7 +48,7 @@ * methods.

      * *

      General searches are initiated by calling the - * {@link #find(com.opensymphony.xwork2.util.ResolverUtil.Test, String...)} ()} method and supplying + * {@link #find(ResolverUtil.Test, String...)} ()} method and supplying * a package name and a Test instance. This will cause the named package and all sub-packages * to be scanned for classes that meet the test. There are also utility methods for the common * use cases of scanning multiple packages for extensions of particular classes, or classes diff --git a/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java b/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java index b072afc525..e126c5c0d2 100644 --- a/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java +++ b/core/src/main/java/org/apache/struts2/util/SortIteratorFilter.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/StrutsLocalizedTextProvider.java b/core/src/main/java/org/apache/struts2/util/StrutsLocalizedTextProvider.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/StrutsLocalizedTextProvider.java rename to core/src/main/java/org/apache/struts2/util/StrutsLocalizedTextProvider.java index d059b85ce7..ea37726b91 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/StrutsLocalizedTextProvider.java +++ b/core/src/main/java/org/apache/struts2/util/StrutsLocalizedTextProvider.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.reflection.ReflectionProvider; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ModelDriven; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.reflection.ReflectionProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.struts2.ModelDriven; import java.beans.PropertyDescriptor; import java.util.Locale; diff --git a/core/src/main/java/org/apache/struts2/util/StrutsTestCaseHelper.java b/core/src/main/java/org/apache/struts2/util/StrutsTestCaseHelper.java index 582dabff7c..6ee1469fe1 100644 --- a/core/src/main/java/org/apache/struts2/util/StrutsTestCaseHelper.java +++ b/core/src/main/java/org/apache/struts2/util/StrutsTestCaseHelper.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; +import org.apache.struts2.ActionContext; +import org.apache.struts2.inject.Container; +import org.apache.struts2.util.ValueStack; +import org.apache.struts2.util.ValueStackFactory; import jakarta.servlet.ServletContext; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java b/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java index 655eeab0e0..9ea59814b9 100644 --- a/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java +++ b/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java @@ -20,7 +20,7 @@ import java.util.Map; -import com.opensymphony.xwork2.conversion.impl.DefaultTypeConverter; +import org.apache.struts2.conversion.impl.DefaultTypeConverter; /** * diff --git a/core/src/main/java/org/apache/struts2/util/StrutsUtil.java b/core/src/main/java/org/apache/struts2/util/StrutsUtil.java index 234c492de8..532220582b 100644 --- a/core/src/main/java/org/apache/struts2/util/StrutsUtil.java +++ b/core/src/main/java/org/apache/struts2/util/StrutsUtil.java @@ -18,10 +18,10 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.TextParseUtil; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.TextParseUtil; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java b/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java index 6745a625d2..41564409ea 100644 --- a/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java +++ b/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.Action; +import org.apache.struts2.Action; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/TextParseUtil.java b/core/src/main/java/org/apache/struts2/util/TextParseUtil.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/TextParseUtil.java rename to core/src/main/java/org/apache/struts2/util/TextParseUtil.java index ebe940e3f0..d332b14328 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/TextParseUtil.java +++ b/core/src/main/java/org/apache/struts2/util/TextParseUtil.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; +import org.apache.struts2.ActionContext; +import org.apache.struts2.conversion.impl.XWorkConverter; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/TextParser.java b/core/src/main/java/org/apache/struts2/util/TextParser.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/TextParser.java rename to core/src/main/java/org/apache/struts2/util/TextParser.java index 767b67d577..7221fb4046 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/TextParser.java +++ b/core/src/main/java/org/apache/struts2/util/TextParser.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; /** * Used to parse expressions like ${foo.bar} or %{bar.foo} but it is up tp the TextParser's diff --git a/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java b/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java index d7ad706817..7cda5d490c 100644 --- a/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java +++ b/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.TextProvider; +import org.apache.struts2.util.ValueStack; import org.apache.commons.text.StringEscapeUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/org/apache/struts2/util/TokenHelper.java b/core/src/main/java/org/apache/struts2/util/TokenHelper.java index c03a135141..985ad6580a 100644 --- a/core/src/main/java/org/apache/struts2/util/TokenHelper.java +++ b/core/src/main/java/org/apache/struts2/util/TokenHelper.java @@ -18,8 +18,8 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.LocalizedTextProvider; +import org.apache.struts2.ActionContext; +import org.apache.struts2.LocalizedTextProvider; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.dispatcher.Parameter; diff --git a/core/src/main/java/org/apache/struts2/util/URLBean.java b/core/src/main/java/org/apache/struts2/util/URLBean.java index 7b0c21d76e..6802048070 100644 --- a/core/src/main/java/org/apache/struts2/util/URLBean.java +++ b/core/src/main/java/org/apache/struts2/util/URLBean.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; +import org.apache.struts2.ActionContext; import org.apache.struts2.views.util.DefaultUrlHelper; import org.apache.struts2.views.util.UrlHelper; diff --git a/core/src/main/java/org/apache/struts2/util/ValueStack.java b/core/src/main/java/org/apache/struts2/util/ValueStack.java index f7d70a35df..eac2998338 100644 --- a/core/src/main/java/org/apache/struts2/util/ValueStack.java +++ b/core/src/main/java/org/apache/struts2/util/ValueStack.java @@ -18,7 +18,6 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.util.CompoundRoot; import org.apache.struts2.ActionContext; import java.util.Map; @@ -31,9 +30,9 @@ */ public interface ValueStack { - String VALUE_STACK = "com.opensymphony.xwork2.util.ValueStack.ValueStack"; + String VALUE_STACK = "org.apache.struts2.util.ValueStack.ValueStack"; - String REPORT_ERRORS_ON_NO_PROP = "com.opensymphony.xwork2.util.ValueStack.ReportErrorsOnNoProp"; + String REPORT_ERRORS_ON_NO_PROP = "org.apache.struts2.util.ValueStack.ReportErrorsOnNoProp"; /** * Gets the context for this value stack. The context holds all the information in the value stack and it's surroundings. diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ValueStackFactory.java b/core/src/main/java/org/apache/struts2/util/ValueStackFactory.java similarity index 76% rename from core/src/main/java/com/opensymphony/xwork2/util/ValueStackFactory.java rename to core/src/main/java/org/apache/struts2/util/ValueStackFactory.java index 788c904534..6837007953 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ValueStackFactory.java +++ b/core/src/main/java/org/apache/struts2/util/ValueStackFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; /** * Factory that creates a value stack, defaulting to the OgnlValueStackFactory @@ -24,18 +24,18 @@ public interface ValueStackFactory { /** - * Get a new instance of {@link com.opensymphony.xwork2.util.ValueStack} + * Get a new instance of {@link org.apache.struts2.util.ValueStack} * - * @return a new {@link com.opensymphony.xwork2.util.ValueStack}. + * @return a new {@link org.apache.struts2.util.ValueStack}. */ ValueStack createValueStack(); - + /** - * Get a new instance of {@link com.opensymphony.xwork2.util.ValueStack} + * Get a new instance of {@link org.apache.struts2.util.ValueStack} * * @param stack an existing stack to include. - * @return a new {@link com.opensymphony.xwork2.util.ValueStack}. + * @return a new {@link org.apache.struts2.util.ValueStack}. */ ValueStack createValueStack(ValueStack stack); - + } diff --git a/core/src/main/java/org/apache/struts2/util/ValueStackProvider.java b/core/src/main/java/org/apache/struts2/util/ValueStackProvider.java index 2a6d1bf0af..b43a0ad992 100644 --- a/core/src/main/java/org/apache/struts2/util/ValueStackProvider.java +++ b/core/src/main/java/org/apache/struts2/util/ValueStackProvider.java @@ -18,7 +18,7 @@ */ package org.apache.struts2.util; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * @since 6.4.0 diff --git a/core/src/main/java/com/opensymphony/xwork2/util/WildcardHelper.java b/core/src/main/java/org/apache/struts2/util/WildcardHelper.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/WildcardHelper.java rename to core/src/main/java/org/apache/struts2/util/WildcardHelper.java index 8a61c63e97..aeffc47274 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/WildcardHelper.java +++ b/core/src/main/java/org/apache/struts2/util/WildcardHelper.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java b/core/src/main/java/org/apache/struts2/util/WildcardUtil.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java rename to core/src/main/java/org/apache/struts2/util/WildcardUtil.java index 77d4880f9d..ad4fe7c49b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java +++ b/core/src/main/java/org/apache/struts2/util/WildcardUtil.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; import java.util.regex.Pattern; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/XWorkTestCaseHelper.java b/core/src/main/java/org/apache/struts2/util/XWorkTestCaseHelper.java similarity index 87% rename from core/src/main/java/com/opensymphony/xwork2/util/XWorkTestCaseHelper.java rename to core/src/main/java/org/apache/struts2/util/XWorkTestCaseHelper.java index e139f05356..0d2c390019 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/XWorkTestCaseHelper.java +++ b/core/src/main/java/org/apache/struts2/util/XWorkTestCaseHelper.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util; +package org.apache.struts2.util; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.config.*; -import com.opensymphony.xwork2.config.providers.StrutsDefaultConfigurationProvider; -import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.ContainerBuilder; -import com.opensymphony.xwork2.util.location.LocatableProperties; +import org.apache.struts2.ActionContext; +import org.apache.struts2.config.*; +import org.apache.struts2.config.providers.StrutsDefaultConfigurationProvider; +import org.apache.struts2.config.providers.XmlConfigurationProvider; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.ContainerBuilder; +import org.apache.struts2.util.location.LocatableProperties; /** - * Generic test setup methods to be used with any unit testing framework. + * Generic test setup methods to be used with any unit testing framework. */ public class XWorkTestCaseHelper { @@ -36,7 +36,7 @@ public static ConfigurationManager setUp() throws Exception { configurationManager.addContainerProvider(new StrutsDefaultConfigurationProvider()); Configuration config = configurationManager.getConfiguration(); Container container = config.getContainer(); - + // Reset the value stack ValueStack stack = container.getInstance(ValueStackFactory.class).createValueStack(); stack.getActionContext().withContainer(container).withValueStack(stack).bind(); @@ -60,7 +60,7 @@ public void init(Configuration configuration) throws ConfigurationException {} public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException { builder.setAllowDuplicates(true); } - + }); configurationManager.addContainerProvider(new StrutsDefaultConfigurationProvider()); for (ConfigurationProvider prov : providers) { @@ -70,7 +70,7 @@ public void register(ContainerBuilder builder, LocatableProperties props) throws configurationManager.addContainerProvider(prov); } Container container = configurationManager.getConfiguration().getContainer(); - + // Reset the value stack ValueStack stack = container.getInstance(ValueStackFactory.class).createValueStack(); stack.getActionContext().withContainer(container).withValueStack(stack).bind(); diff --git a/core/src/main/java/com/opensymphony/xwork2/util/classloader/AbstractResourceStore.java b/core/src/main/java/org/apache/struts2/util/classloader/AbstractResourceStore.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/classloader/AbstractResourceStore.java rename to core/src/main/java/org/apache/struts2/util/classloader/AbstractResourceStore.java index 5fcdafd485..2415da361c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/classloader/AbstractResourceStore.java +++ b/core/src/main/java/org/apache/struts2/util/classloader/AbstractResourceStore.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.classloader; +package org.apache.struts2.util.classloader; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/classloader/FileResourceStore.java b/core/src/main/java/org/apache/struts2/util/classloader/FileResourceStore.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/classloader/FileResourceStore.java rename to core/src/main/java/org/apache/struts2/util/classloader/FileResourceStore.java index 204ee54261..0fbb75182f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/classloader/FileResourceStore.java +++ b/core/src/main/java/org/apache/struts2/util/classloader/FileResourceStore.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.classloader; +package org.apache.struts2.util.classloader; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/classloader/JarResourceStore.java b/core/src/main/java/org/apache/struts2/util/classloader/JarResourceStore.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/classloader/JarResourceStore.java rename to core/src/main/java/org/apache/struts2/util/classloader/JarResourceStore.java index fee136fad8..3b5c0c8f86 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/classloader/JarResourceStore.java +++ b/core/src/main/java/org/apache/struts2/util/classloader/JarResourceStore.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.classloader; +package org.apache.struts2.util.classloader; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java b/core/src/main/java/org/apache/struts2/util/classloader/ReloadingClassLoader.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java rename to core/src/main/java/org/apache/struts2/util/classloader/ReloadingClassLoader.java index 14003ed4af..da75b88a55 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java +++ b/core/src/main/java/org/apache/struts2/util/classloader/ReloadingClassLoader.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.classloader; +package org.apache.struts2.util.classloader; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; +import org.apache.struts2.ActionContext; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; import org.apache.commons.lang3.ObjectUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStore.java b/core/src/main/java/org/apache/struts2/util/classloader/ResourceStore.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStore.java rename to core/src/main/java/org/apache/struts2/util/classloader/ResourceStore.java index c415b098db..d8035ee8be 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStore.java +++ b/core/src/main/java/org/apache/struts2/util/classloader/ResourceStore.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.classloader; +package org.apache.struts2.util.classloader; /** * *interface taken from Apache JCI diff --git a/core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStoreClassLoader.java b/core/src/main/java/org/apache/struts2/util/classloader/ResourceStoreClassLoader.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStoreClassLoader.java rename to core/src/main/java/org/apache/struts2/util/classloader/ResourceStoreClassLoader.java index 8a9301eed2..afe8146888 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/classloader/ResourceStoreClassLoader.java +++ b/core/src/main/java/org/apache/struts2/util/classloader/ResourceStoreClassLoader.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.classloader; +package org.apache.struts2.util.classloader; /** * class taken from Apache JCI diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java b/core/src/main/java/org/apache/struts2/util/finder/ClassFinder.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java rename to core/src/main/java/org/apache/struts2/util/finder/ClassFinder.java index 92e2136557..3d43996903 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java +++ b/core/src/main/java/org/apache/struts2/util/finder/ClassFinder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.finder; +package org.apache.struts2.util.finder; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinderFactory.java b/core/src/main/java/org/apache/struts2/util/finder/ClassFinderFactory.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinderFactory.java rename to core/src/main/java/org/apache/struts2/util/finder/ClassFinderFactory.java index ed71d9c7a4..b0658c34ec 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinderFactory.java +++ b/core/src/main/java/org/apache/struts2/util/finder/ClassFinderFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.finder; +package org.apache.struts2.util.finder; import java.net.URL; import java.util.Collection; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassLoaderInterface.java b/core/src/main/java/org/apache/struts2/util/finder/ClassLoaderInterface.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/finder/ClassLoaderInterface.java rename to core/src/main/java/org/apache/struts2/util/finder/ClassLoaderInterface.java index b213e389b5..2d60676e28 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassLoaderInterface.java +++ b/core/src/main/java/org/apache/struts2/util/finder/ClassLoaderInterface.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.finder; +package org.apache.struts2.util.finder; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassLoaderInterfaceDelegate.java b/core/src/main/java/org/apache/struts2/util/finder/ClassLoaderInterfaceDelegate.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/finder/ClassLoaderInterfaceDelegate.java rename to core/src/main/java/org/apache/struts2/util/finder/ClassLoaderInterfaceDelegate.java index 74ab894f31..50283593f2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/finder/ClassLoaderInterfaceDelegate.java +++ b/core/src/main/java/org/apache/struts2/util/finder/ClassLoaderInterfaceDelegate.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.finder; +package org.apache.struts2.util.finder; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java b/core/src/main/java/org/apache/struts2/util/finder/ResourceFinder.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java rename to core/src/main/java/org/apache/struts2/util/finder/ResourceFinder.java index a950f7411c..a7f9a0ab00 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java +++ b/core/src/main/java/org/apache/struts2/util/finder/ResourceFinder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.finder; +package org.apache.struts2.util.finder; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/Test.java b/core/src/main/java/org/apache/struts2/util/finder/Test.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/finder/Test.java rename to core/src/main/java/org/apache/struts2/util/finder/Test.java index 70476f97a6..51b828afb9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/finder/Test.java +++ b/core/src/main/java/org/apache/struts2/util/finder/Test.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.finder; +package org.apache.struts2.util.finder; /** * This is the testing interface that is used to accept or reject resources. diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java b/core/src/main/java/org/apache/struts2/util/finder/UrlSet.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java rename to core/src/main/java/org/apache/struts2/util/finder/UrlSet.java index 9d32415e77..16a8f7ef34 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java +++ b/core/src/main/java/org/apache/struts2/util/finder/UrlSet.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.finder; +package org.apache.struts2.util.finder; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java b/core/src/main/java/org/apache/struts2/util/fs/DefaultFileManager.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java rename to core/src/main/java/org/apache/struts2/util/fs/DefaultFileManager.java index 0cc42cbeaf..82bf06348a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManager.java +++ b/core/src/main/java/org/apache/struts2/util/fs/DefaultFileManager.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.fs; +package org.apache.struts2.util.fs; -import com.opensymphony.xwork2.FileManager; +import org.apache.struts2.FileManager; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java b/core/src/main/java/org/apache/struts2/util/fs/DefaultFileManagerFactory.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java rename to core/src/main/java/org/apache/struts2/util/fs/DefaultFileManagerFactory.java index d5cf1b06c2..1b3b8cd7b5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java +++ b/core/src/main/java/org/apache/struts2/util/fs/DefaultFileManagerFactory.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.fs; +package org.apache.struts2.util.fs; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.inject.Container; -import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.inject.Container; +import org.apache.struts2.inject.Inject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsConstants; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/fs/FileRevision.java b/core/src/main/java/org/apache/struts2/util/fs/FileRevision.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/fs/FileRevision.java rename to core/src/main/java/org/apache/struts2/util/fs/FileRevision.java index 0c93724e9d..c20394c8f9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/fs/FileRevision.java +++ b/core/src/main/java/org/apache/struts2/util/fs/FileRevision.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.fs; +package org.apache.struts2.util.fs; import java.io.File; import java.net.URISyntaxException; diff --git a/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java b/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java index b8e4b1f6d0..365dd6988f 100644 --- a/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java +++ b/core/src/main/java/org/apache/struts2/util/fs/JBossFileManager.java @@ -18,10 +18,6 @@ */ package org.apache.struts2.util.fs; -import com.opensymphony.xwork2.util.fs.DefaultFileManager; -import com.opensymphony.xwork2.util.fs.FileRevision; -import com.opensymphony.xwork2.util.fs.JarEntryRevision; -import com.opensymphony.xwork2.util.fs.Revision; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/fs/JarEntryRevision.java b/core/src/main/java/org/apache/struts2/util/fs/JarEntryRevision.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/fs/JarEntryRevision.java rename to core/src/main/java/org/apache/struts2/util/fs/JarEntryRevision.java index 130068ec57..f8953c01af 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/fs/JarEntryRevision.java +++ b/core/src/main/java/org/apache/struts2/util/fs/JarEntryRevision.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.fs; +package org.apache.struts2.util.fs; -import com.opensymphony.xwork2.FileManager; +import org.apache.struts2.FileManager; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/fs/Revision.java b/core/src/main/java/org/apache/struts2/util/fs/Revision.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/fs/Revision.java rename to core/src/main/java/org/apache/struts2/util/fs/Revision.java index 95d579402d..becb71e7a9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/fs/Revision.java +++ b/core/src/main/java/org/apache/struts2/util/fs/Revision.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.fs; +package org.apache.struts2.util.fs; import java.net.URL; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/fs/StrutsJarURLConnection.java b/core/src/main/java/org/apache/struts2/util/fs/StrutsJarURLConnection.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/fs/StrutsJarURLConnection.java rename to core/src/main/java/org/apache/struts2/util/fs/StrutsJarURLConnection.java index 52ad48b05d..a98944086b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/fs/StrutsJarURLConnection.java +++ b/core/src/main/java/org/apache/struts2/util/fs/StrutsJarURLConnection.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.fs; +package org.apache.struts2.util.fs; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/Locatable.java b/core/src/main/java/org/apache/struts2/util/location/Locatable.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/util/location/Locatable.java rename to core/src/main/java/org/apache/struts2/util/location/Locatable.java index 8d08b11a7a..ec088a4fdb 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/Locatable.java +++ b/core/src/main/java/org/apache/struts2/util/location/Locatable.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.location; +package org.apache.struts2.util.location; /** * A interface that should be implemented by objects knowning their location (i.e. where they diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/LocatableProperties.java b/core/src/main/java/org/apache/struts2/util/location/LocatableProperties.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/location/LocatableProperties.java rename to core/src/main/java/org/apache/struts2/util/location/LocatableProperties.java index 008451fa7b..4b9ea22a38 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/LocatableProperties.java +++ b/core/src/main/java/org/apache/struts2/util/location/LocatableProperties.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.location; +package org.apache.struts2.util.location; -import com.opensymphony.xwork2.util.PropertiesReader; +import org.apache.struts2.util.PropertiesReader; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/Located.java b/core/src/main/java/org/apache/struts2/util/location/Located.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/location/Located.java rename to core/src/main/java/org/apache/struts2/util/location/Located.java index 8e268f71e0..4c4f125054 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/Located.java +++ b/core/src/main/java/org/apache/struts2/util/location/Located.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.location; +package org.apache.struts2.util.location; /** * Base class for location aware objects diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/Location.java b/core/src/main/java/org/apache/struts2/util/location/Location.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/location/Location.java rename to core/src/main/java/org/apache/struts2/util/location/Location.java index 84f100f36f..131cab1a68 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/Location.java +++ b/core/src/main/java/org/apache/struts2/util/location/Location.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.location; +package org.apache.struts2.util.location; import java.util.List; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationAttributes.java b/core/src/main/java/org/apache/struts2/util/location/LocationAttributes.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/location/LocationAttributes.java rename to core/src/main/java/org/apache/struts2/util/location/LocationAttributes.java index 3bceb97368..2ef4a65b7c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationAttributes.java +++ b/core/src/main/java/org/apache/struts2/util/location/LocationAttributes.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.location; +package org.apache.struts2.util.location; import org.w3c.dom.Attr; import org.w3c.dom.Element; @@ -31,7 +31,7 @@ /** *

      * A class to handle location information stored in attributes. - * These attributes are typically setup using {@link com.opensymphony.xwork2.util.location.LocationAttributes.Pipe} + * These attributes are typically setup using {@link org.apache.struts2.util.location.LocationAttributes.Pipe} * which augments the SAX stream with additional attributes, e.g.: *

      * @@ -42,8 +42,8 @@ * <foo loc:src="file://path/to/file.xml" loc:line="2" loc:column="3"/> * </root> * - * - * @see com.opensymphony.xwork2.util.location.LocationAttributes.Pipe + * + * @see org.apache.struts2.util.location.LocationAttributes.Pipe * @since 2.1.8 */ public class LocationAttributes { @@ -65,15 +65,15 @@ public class LocationAttributes { public static final String Q_LINE_ATTR = "loc:line"; /** Attribute qualified name for the column number */ public static final String Q_COL_ATTR = "loc:column"; - + // Private constructor, we only have static methods private LocationAttributes() { // Nothing } - + /** * Add location attributes to a set of SAX attributes. - * + * * @param locator the Locator (can be null) * @param attrs the Attributes where locator information should be added * @return Location enabled Attributes. @@ -83,7 +83,7 @@ public static Attributes addLocationAttributes(Locator locator, Attributes attrs // No location information known, or already has it return attrs; } - + // Get an AttributeImpl so that we can add new attributes. AttributesImpl newAttrs = attrs instanceof AttributesImpl ? (AttributesImpl)attrs : new AttributesImpl(attrs); @@ -91,13 +91,13 @@ public static Attributes addLocationAttributes(Locator locator, Attributes attrs newAttrs.addAttribute(URI, SRC_ATTR, Q_SRC_ATTR, "CDATA", locator.getSystemId()); newAttrs.addAttribute(URI, LINE_ATTR, Q_LINE_ATTR, "CDATA", Integer.toString(locator.getLineNumber())); newAttrs.addAttribute(URI, COL_ATTR, Q_COL_ATTR, "CDATA", Integer.toString(locator.getColumnNumber())); - + return newAttrs; } - + /** * Returns the {@link Location} of an element (SAX flavor). - * + * * @param attrs the element's attributes that hold the location information * @param description a description for the location (can be null) * @return a {@link Location} object @@ -107,7 +107,7 @@ public static Location getLocation(Attributes attrs, String description) { if (src == null) { return Location.UNKNOWN; } - + return new LocationImpl(description, src, getLine(attrs), getColumn(attrs)); } @@ -115,7 +115,7 @@ public static Location getLocation(Attributes attrs, String description) { * Returns the location of an element (SAX flavor). If the location is to be kept * into an object built from this element, consider using {@link #getLocation(Attributes, String)} * and the {@link Locatable} interface. - * + * * @param attrs the element's attributes that hold the location information * @return a location string as defined by {@link Location}. */ @@ -124,13 +124,13 @@ public static String getLocationString(Attributes attrs) { if (src == null) { return LocationUtils.UNKNOWN_STRING; } - + return src + ":" + attrs.getValue(URI, LINE_ATTR) + ":" + attrs.getValue(URI, COL_ATTR); } - + /** * Returns the URI of an element (SAX flavor) - * + * * @param attrs the element's attributes that hold the location information * @return the element's URI or "[unknown location]" if attrs * has no location information. @@ -139,10 +139,10 @@ public static String getURI(Attributes attrs) { String src = attrs.getValue(URI, SRC_ATTR); return src != null ? src : LocationUtils.UNKNOWN_STRING; } - + /** * Returns the line number of an element (SAX flavor) - * + * * @param attrs the element's attributes that hold the location information * @return the element's line number or -1 if attrs * has no location information. @@ -151,10 +151,10 @@ public static int getLine(Attributes attrs) { String line = attrs.getValue(URI, LINE_ATTR); return line != null ? Integer.parseInt(line) : -1; } - + /** * Returns the column number of an element (SAX flavor) - * + * * @param attrs the element's attributes that hold the location information * @return the element's column number or -1 if attrs * has no location information. @@ -163,10 +163,10 @@ public static int getColumn(Attributes attrs) { String col = attrs.getValue(URI, COL_ATTR); return col != null ? Integer.parseInt(col) : -1; } - + /** * Returns the {@link Location} of an element (DOM flavor). - * + * * @param elem the element that holds the location information * @param description a description for the location (if null, the element's name is used) * @return a {@link Location} object @@ -180,7 +180,7 @@ public static Location getLocation(Element elem, String description) { return new LocationImpl(description == null ? elem.getNodeName() : description, srcAttr.getValue(), getLine(elem), getColumn(elem)); } - + /** * Same as getLocation(elem, null). * @@ -190,13 +190,13 @@ public static Location getLocation(Element elem, String description) { public static Location getLocation(Element elem) { return getLocation(elem, null); } - + /** * Returns the location of an element that has been processed by this pipe (DOM flavor). * If the location is to be kept into an object built from this element, consider using * {@link #getLocation(Element)} and the {@link Locatable} interface. - * + * * @param elem the element that holds the location information * @return a location string as defined by {@link Location}. */ @@ -205,13 +205,13 @@ public static String getLocationString(Element elem) { if (srcAttr == null) { return LocationUtils.UNKNOWN_STRING; } - + return srcAttr.getValue() + ":" + elem.getAttributeNS(URI, LINE_ATTR) + ":" + elem.getAttributeNS(URI, COL_ATTR); } - + /** * Returns the URI of an element (DOM flavor) - * + * * @param elem the element that holds the location information * @return the element's URI or "[unknown location]" if elem * has no location information. @@ -223,7 +223,7 @@ public static String getURI(Element elem) { /** * Returns the line number of an element (DOM flavor) - * + * * @param elem the element that holds the location information * @return the element's line number or -1 if elem * has no location information. @@ -235,7 +235,7 @@ public static int getLine(Element elem) { /** * Returns the column number of an element (DOM flavor) - * + * * @param elem the element that holds the location information * @return the element's column number or -1 if elem * has no location information. @@ -244,10 +244,10 @@ public static int getColumn(Element elem) { Attr attr = elem.getAttributeNodeNS(URI, COL_ATTR); return attr != null ? Integer.parseInt(attr.getValue()) : -1; } - + /** * Remove the location attributes from a DOM element. - * + * * @param elem the element to remove the location attributes from. * @param recurse if true, also remove location attributes on descendant elements. */ @@ -282,15 +282,15 @@ public static void remove(Element elem, boolean recurse) { * Note: Although this adds a lot of information to the serialized form of the document, * the overhead in SAX events is not that big, as attribute names are interned, and all src * attributes point to the same string. - * - * @see com.opensymphony.xwork2.util.location.LocationAttributes + * + * @see org.apache.struts2.util.location.LocationAttributes */ public static class Pipe implements ContentHandler { - + private Locator locator; - + private ContentHandler nextHandler; - + /** * Create a filter. It has to be chained to another handler to be really useful. */ @@ -309,12 +309,12 @@ public void setDocumentLocator(Locator locator) { this.locator = locator; nextHandler.setDocumentLocator(locator); } - + public void startDocument() throws SAXException { nextHandler.startDocument(); nextHandler.startPrefixMapping(LocationAttributes.PREFIX, LocationAttributes.URI); } - + public void endDocument() throws SAXException { endPrefixMapping(LocationAttributes.PREFIX); nextHandler.endDocument(); diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationImpl.java b/core/src/main/java/org/apache/struts2/util/location/LocationImpl.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/location/LocationImpl.java rename to core/src/main/java/org/apache/struts2/util/location/LocationImpl.java index 3f3fc63f1d..02c0987b86 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationImpl.java +++ b/core/src/main/java/org/apache/struts2/util/location/LocationImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.location; +package org.apache.struts2.util.location; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationUtils.java b/core/src/main/java/org/apache/struts2/util/location/LocationUtils.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/util/location/LocationUtils.java rename to core/src/main/java/org/apache/struts2/util/location/LocationUtils.java index 28a677f632..e2da199612 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationUtils.java +++ b/core/src/main/java/org/apache/struts2/util/location/LocationUtils.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.location; +package org.apache.struts2.util.location; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.struts2.config.StrutsJavaConfiguration; import org.w3c.dom.Element; import org.xml.sax.Locator; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/package.html b/core/src/main/java/org/apache/struts2/util/location/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/util/location/package.html rename to core/src/main/java/org/apache/struts2/util/location/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/util/package.html b/core/src/main/java/org/apache/struts2/util/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/util/package.html rename to core/src/main/java/org/apache/struts2/util/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionContextFactory.java b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionContextFactory.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionContextFactory.java rename to core/src/main/java/org/apache/struts2/util/reflection/ReflectionContextFactory.java index b8792537b3..5b0075f3bf 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionContextFactory.java +++ b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionContextFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.reflection; +package org.apache.struts2.util.reflection; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionContextState.java b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionContextState.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionContextState.java rename to core/src/main/java/org/apache/struts2/util/reflection/ReflectionContextState.java index c3556cfee2..cc2f457c3e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionContextState.java +++ b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionContextState.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.reflection; +package org.apache.struts2.util.reflection; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; +import org.apache.struts2.conversion.impl.XWorkConverter; import java.util.HashMap; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionException.java b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionException.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionException.java rename to core/src/main/java/org/apache/struts2/util/reflection/ReflectionException.java index 9809d80170..a0272aea4d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionException.java +++ b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionException.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.reflection; +package org.apache.struts2.util.reflection; import org.apache.struts2.StrutsException; diff --git a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionExceptionHandler.java b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionExceptionHandler.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionExceptionHandler.java rename to core/src/main/java/org/apache/struts2/util/reflection/ReflectionExceptionHandler.java index bc66de8e3b..ecdd60b147 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionExceptionHandler.java +++ b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionExceptionHandler.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.reflection; +package org.apache.struts2.util.reflection; /** * Declares a class that wants to handle its own reflection exceptions @@ -25,7 +25,7 @@ public interface ReflectionExceptionHandler { /** * Handles a reflection exception - * + * * @param ex The reflection exception */ void handle(ReflectionException ex); diff --git a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionProvider.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java rename to core/src/main/java/org/apache/struts2/util/reflection/ReflectionProvider.java index 85945aa791..7ffc19a713 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java +++ b/core/src/main/java/org/apache/struts2/util/reflection/ReflectionProvider.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.util.reflection; +package org.apache.struts2.util.reflection; + +import org.apache.struts2.conversion.impl.XWorkConverter; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; @@ -26,13 +28,13 @@ import java.util.Map; public interface ReflectionProvider { - + Method getGetMethod(Class targetClass, String propertyName) throws IntrospectionException, ReflectionException; - + Method getSetMethod(Class targetClass, String propertyName) throws IntrospectionException, ReflectionException; - + Field getField(Class inClass, String name); - + /** * Sets the object's properties using the default type converter, defaulting to not throw * exceptions for problems setting the properties. @@ -53,7 +55,7 @@ public interface ReflectionProvider { * problems setting the properties */ void setProperties(Map props, Object o, Map context, boolean throwPropertyExceptions) throws ReflectionException; - + /** * Sets the properties on the object using the default context, defaulting to not throwing * exceptions for problems setting the properties. @@ -62,7 +64,7 @@ public interface ReflectionProvider { * @param o object */ void setProperties(Map properties, Object o); - + /** * This method returns a PropertyDescriptor for the given class and property name using * a Map lookup (using getPropertyDescriptorsMap()). @@ -79,7 +81,7 @@ public interface ReflectionProvider { /** * Copies the properties in the object "from" and sets them in the object "to" - * using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none + * using specified type converter, or {@link XWorkConverter} if none * is specified. * * @param from the source object @@ -94,7 +96,7 @@ public interface ReflectionProvider { /** * Copies the properties in the object "from" and sets them in the object "to" * only setting properties defined in the given "editable" class (or interface) - * using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none + * using specified type converter, or {@link XWorkConverter} if none * is specified. * * @param from the source object @@ -118,7 +120,7 @@ public interface ReflectionProvider { * @throws ReflectionException in case of reflection problems */ Object getRealTarget(String property, Map context, Object root) throws ReflectionException; - + /** * Sets the named property to the supplied value on the Object, * @@ -141,7 +143,7 @@ public interface ReflectionProvider { * @param context the context which may include the TypeConverter */ void setProperty(String name, Object value, Object o, Map context); - + /** * Creates a Map with read properties for the given source object. *

      @@ -154,7 +156,7 @@ public interface ReflectionProvider { * @throws IntrospectionException is thrown if an exception occurs during introspection. */ Map getBeanMap(Object source) throws IntrospectionException, ReflectionException; - + /** * Evaluates the given OGNL expression to extract a value from the given root * object in a given context @@ -165,7 +167,7 @@ public interface ReflectionProvider { * @return the result of evaluating the expression */ Object getValue( String expression, Map context, Object root ) throws ReflectionException; - + /** * Evaluates the given OGNL expression to insert a value into the object graph * rooted at the given root object given the context. @@ -176,10 +178,10 @@ public interface ReflectionProvider { * @param value the value to insert into the object graph */ void setValue( String expression, Map context, Object root, Object value ) throws ReflectionException; - + /** * Get's the java beans property descriptors for the given source. - * + * * @param source the source object. * @return property descriptors. * @throws IntrospectionException is thrown if an exception occurs during introspection. diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ActionValidatorManager.java b/core/src/main/java/org/apache/struts2/validator/ActionValidatorManager.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/ActionValidatorManager.java rename to core/src/main/java/org/apache/struts2/validator/ActionValidatorManager.java index ea0de3a724..99356a6b3c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ActionValidatorManager.java +++ b/core/src/main/java/org/apache/struts2/validator/ActionValidatorManager.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; import java.util.List; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java b/core/src/main/java/org/apache/struts2/validator/AnnotationActionValidatorManager.java similarity index 93% rename from core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java rename to core/src/main/java/org/apache/struts2/validator/AnnotationActionValidatorManager.java index 260c0c5e24..c2d5ca1e11 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java +++ b/core/src/main/java/org/apache/struts2/validator/AnnotationActionValidatorManager.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.config.entities.ActionConfig; +import org.apache.struts2.ActionContext; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.config.entities.ActionConfig; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java b/core/src/main/java/org/apache/struts2/validator/AnnotationValidationConfigurationBuilder.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java rename to core/src/main/java/org/apache/struts2/validator/AnnotationValidationConfigurationBuilder.java index f1de89269b..fa0a23a07e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java +++ b/core/src/main/java/org/apache/struts2/validator/AnnotationValidationConfigurationBuilder.java @@ -16,29 +16,29 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; - -import com.opensymphony.xwork2.util.AnnotationUtils; -import com.opensymphony.xwork2.validator.annotations.ConditionalVisitorFieldValidator; -import com.opensymphony.xwork2.validator.annotations.ConversionErrorFieldValidator; -import com.opensymphony.xwork2.validator.annotations.CreditCardValidator; -import com.opensymphony.xwork2.validator.annotations.CustomValidator; -import com.opensymphony.xwork2.validator.annotations.DateRangeFieldValidator; -import com.opensymphony.xwork2.validator.annotations.DoubleRangeFieldValidator; -import com.opensymphony.xwork2.validator.annotations.EmailValidator; -import com.opensymphony.xwork2.validator.annotations.ExpressionValidator; -import com.opensymphony.xwork2.validator.annotations.FieldExpressionValidator; -import com.opensymphony.xwork2.validator.annotations.IntRangeFieldValidator; -import com.opensymphony.xwork2.validator.annotations.LongRangeFieldValidator; -import com.opensymphony.xwork2.validator.annotations.RegexFieldValidator; -import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator; -import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator; -import com.opensymphony.xwork2.validator.annotations.ShortRangeFieldValidator; -import com.opensymphony.xwork2.validator.annotations.StringLengthFieldValidator; -import com.opensymphony.xwork2.validator.annotations.UrlValidator; -import com.opensymphony.xwork2.validator.annotations.ValidationParameter; -import com.opensymphony.xwork2.validator.annotations.Validations; -import com.opensymphony.xwork2.validator.annotations.VisitorFieldValidator; +package org.apache.struts2.validator; + +import org.apache.struts2.util.AnnotationUtils; +import org.apache.struts2.validator.annotations.ConditionalVisitorFieldValidator; +import org.apache.struts2.validator.annotations.ConversionErrorFieldValidator; +import org.apache.struts2.validator.annotations.CreditCardValidator; +import org.apache.struts2.validator.annotations.CustomValidator; +import org.apache.struts2.validator.annotations.DateRangeFieldValidator; +import org.apache.struts2.validator.annotations.DoubleRangeFieldValidator; +import org.apache.struts2.validator.annotations.EmailValidator; +import org.apache.struts2.validator.annotations.ExpressionValidator; +import org.apache.struts2.validator.annotations.FieldExpressionValidator; +import org.apache.struts2.validator.annotations.IntRangeFieldValidator; +import org.apache.struts2.validator.annotations.LongRangeFieldValidator; +import org.apache.struts2.validator.annotations.RegexFieldValidator; +import org.apache.struts2.validator.annotations.RequiredFieldValidator; +import org.apache.struts2.validator.annotations.RequiredStringValidator; +import org.apache.struts2.validator.annotations.ShortRangeFieldValidator; +import org.apache.struts2.validator.annotations.StringLengthFieldValidator; +import org.apache.struts2.validator.annotations.UrlValidator; +import org.apache.struts2.validator.annotations.ValidationParameter; +import org.apache.struts2.validator.annotations.Validations; +import org.apache.struts2.validator.annotations.VisitorFieldValidator; import org.apache.commons.lang3.StringUtils; import java.lang.annotation.Annotation; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java b/core/src/main/java/org/apache/struts2/validator/DefaultActionValidatorManager.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java rename to core/src/main/java/org/apache/struts2/validator/DefaultActionValidatorManager.java index f05b804860..275aaf1696 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java +++ b/core/src/main/java/org/apache/struts2/validator/DefaultActionValidatorManager.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.FileManager; -import com.opensymphony.xwork2.FileManagerFactory; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.ValueStack; +package org.apache.struts2.validator; + +import org.apache.struts2.ActionContext; +import org.apache.struts2.FileManager; +import org.apache.struts2.FileManagerFactory; +import org.apache.struts2.TextProviderFactory; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; +import org.apache.struts2.util.ValueStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsConstants; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFactory.java b/core/src/main/java/org/apache/struts2/validator/DefaultValidatorFactory.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFactory.java rename to core/src/main/java/org/apache/struts2/validator/DefaultValidatorFactory.java index 5ae3ee8c07..4e8a233088 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFactory.java +++ b/core/src/main/java/org/apache/struts2/validator/DefaultValidatorFactory.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.inject.Initializable; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; +package org.apache.struts2.validator; + +import org.apache.struts2.ActionContext; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.inject.Initializable; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.ClassLoaderUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.struts2.StrutsException; @@ -180,7 +180,7 @@ private void parseValidators() { } // Parse default validator configurations - String resourceName = "com/opensymphony/xwork2/validator/validators/default.xml"; + String resourceName = "org/apache/struts2/validator/validators/default.xml"; retrieveValidatorConfiguration(resourceName); // Overwrite and extend defaults with application specific validator configurations diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java b/core/src/main/java/org/apache/struts2/validator/DefaultValidatorFileParser.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java rename to core/src/main/java/org/apache/struts2/validator/DefaultValidatorFileParser.java index a576439db3..d61ff4595b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java +++ b/core/src/main/java/org/apache/struts2/validator/DefaultValidatorFileParser.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.providers.XmlHelper; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.DomHelper; +package org.apache.struts2.validator; + +import org.apache.struts2.ActionContext; +import org.apache.struts2.ObjectFactory; +import org.apache.struts2.config.ConfigurationException; +import org.apache.struts2.config.providers.XmlHelper; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.util.DomHelper; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.w3c.dom.CharacterData; @@ -53,7 +53,7 @@ * @author Rene Gielen * @author Martin Gilday * - * @see com.opensymphony.xwork2.validator.ValidatorConfig + * @see ValidatorConfig */ public class DefaultValidatorFileParser implements ValidatorFileParser { diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java b/core/src/main/java/org/apache/struts2/validator/DelegatingValidatorContext.java similarity index 94% rename from core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java rename to core/src/main/java/org/apache/struts2/validator/DelegatingValidatorContext.java index 30bbee9894..56500f71f8 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java +++ b/core/src/main/java/org/apache/struts2/validator/DelegatingValidatorContext.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.CompositeTextProvider; -import com.opensymphony.xwork2.LocaleProvider; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.interceptor.ValidationAware; -import com.opensymphony.xwork2.util.ValueStack; +package org.apache.struts2.validator; + import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.struts2.ActionContext; +import org.apache.struts2.CompositeTextProvider; +import org.apache.struts2.LocaleProvider; +import org.apache.struts2.LocaleProviderFactory; +import org.apache.struts2.TextProvider; +import org.apache.struts2.TextProviderFactory; +import org.apache.struts2.interceptor.ValidationAware; +import org.apache.struts2.util.ValueStack; import java.util.Collection; import java.util.List; @@ -254,8 +254,8 @@ protected static LocaleProvider makeLocaleProvider(Object object) { } protected static ValidationAware makeValidationAware(Object object) { - if (object instanceof org.apache.struts2.interceptor.ValidationAware) { - return ValidationAware.adapt((org.apache.struts2.interceptor.ValidationAware) object); + if (object instanceof ValidationAware validationAware) { + return validationAware; } else { return new LoggingValidationAware(object); } diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/FieldValidator.java b/core/src/main/java/org/apache/struts2/validator/FieldValidator.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/validator/FieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/FieldValidator.java index 1536ded13a..c3af5c225f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/FieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/FieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; /** * The FieldValidator interface defines the methods to be implemented by FieldValidators. diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ShortCircuitableValidator.java b/core/src/main/java/org/apache/struts2/validator/ShortCircuitableValidator.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/validator/ShortCircuitableValidator.java rename to core/src/main/java/org/apache/struts2/validator/ShortCircuitableValidator.java index 9e6372dba6..05d4faeb03 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ShortCircuitableValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/ShortCircuitableValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; /** * This interface should be implemented by validators that can short-circuit the validator queue diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ValidationException.java b/core/src/main/java/org/apache/struts2/validator/ValidationException.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/validator/ValidationException.java rename to core/src/main/java/org/apache/struts2/validator/ValidationException.java index ec0e516a82..b0a7df359f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ValidationException.java +++ b/core/src/main/java/org/apache/struts2/validator/ValidationException.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; /** * ValidationException. diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java b/core/src/main/java/org/apache/struts2/validator/ValidationInterceptor.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java rename to core/src/main/java/org/apache/struts2/validator/ValidationInterceptor.java index cc22250e3f..0b7d49f97d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java +++ b/core/src/main/java/org/apache/struts2/validator/ValidationInterceptor.java @@ -16,17 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor; -import com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil; -import com.opensymphony.xwork2.interceptor.ValidationAware; +import org.apache.struts2.ActionInvocation; +import org.apache.struts2.ActionProxy; +import org.apache.struts2.Validateable; +import org.apache.struts2.inject.Inject; +import org.apache.struts2.interceptor.MethodFilterInterceptor; +import org.apache.struts2.interceptor.PrefixMethodInvocationUtil; +import org.apache.struts2.interceptor.ValidationAware; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.struts2.Validateable; /** * @@ -128,7 +128,7 @@ * @author Rainer Hermanns * @author Alexandru Popescu * @see ActionValidatorManager - * @see com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor + * @see org.apache.struts2.interceptor.DefaultWorkflowInterceptor */ public class ValidationInterceptor extends MethodFilterInterceptor { diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/Validator.java b/core/src/main/java/org/apache/struts2/validator/Validator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/Validator.java rename to core/src/main/java/org/apache/struts2/validator/Validator.java index 6550e513a0..02244818fe 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/Validator.java +++ b/core/src/main/java/org/apache/struts2/validator/Validator.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; -import com.opensymphony.xwork2.util.ValueStack; +import org.apache.struts2.util.ValueStack; /** * diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorConfig.java b/core/src/main/java/org/apache/struts2/validator/ValidatorConfig.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/validator/ValidatorConfig.java rename to core/src/main/java/org/apache/struts2/validator/ValidatorConfig.java index 4fb4933286..d291c25e91 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorConfig.java +++ b/core/src/main/java/org/apache/struts2/validator/ValidatorConfig.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; -import com.opensymphony.xwork2.util.location.Located; -import com.opensymphony.xwork2.util.location.Location; +import org.apache.struts2.util.location.Located; +import org.apache.struts2.util.location.Location; import java.util.Collections; import java.util.LinkedHashMap; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorContext.java b/core/src/main/java/org/apache/struts2/validator/ValidatorContext.java similarity index 87% rename from core/src/main/java/com/opensymphony/xwork2/validator/ValidatorContext.java rename to core/src/main/java/org/apache/struts2/validator/ValidatorContext.java index dd5f6f8b6f..f5401b7ce7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorContext.java +++ b/core/src/main/java/org/apache/struts2/validator/ValidatorContext.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; -import com.opensymphony.xwork2.LocaleProvider; -import com.opensymphony.xwork2.TextProvider; -import com.opensymphony.xwork2.interceptor.ValidationAware; +import org.apache.struts2.LocaleProvider; +import org.apache.struts2.TextProvider; +import org.apache.struts2.interceptor.ValidationAware; /** * The context for validation. This interface extends others to provide methods for reporting diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorFactory.java b/core/src/main/java/org/apache/struts2/validator/ValidatorFactory.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/validator/ValidatorFactory.java rename to core/src/main/java/org/apache/struts2/validator/ValidatorFactory.java index f085d1b127..9b172ecffe 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorFactory.java +++ b/core/src/main/java/org/apache/struts2/validator/ValidatorFactory.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; /** * ValidatorFactory @@ -37,7 +37,7 @@ * validators.xml if being defined should be available in the classpath. However * this is not necessary, if no custom validator is needed. Predefined sets of validators * will automatically be picked up when defined in - * com/opensymphony/xwork2/validator/validators/default.xml packaged in + * org/apache/struts2/validator/validators/default.xml packaged in * in the xwork jar file. See ValidatorFactory static block for details. * *

      @@ -49,7 +49,7 @@ * place in the classpath, do remember to copy all the other pre-defined validators * that is needed into the validators.xml as if not they will not be registered. * Once a validators.xml is detected in the classpath, the default one - * (com/opensymphony/xwork2/validator/validators/default.xml) will not be loaded. + * (org/apache/struts2/validator/validators/default.xml) will not be loaded. * It is only loaded when a custom validators.xml cannot be found in the classpath. * Be careful. * @@ -65,7 +65,7 @@ * *
        * 
      - *     <interceptor name="validator" class="com.opensymphony.xwork2.validator.ValidationInterceptor"/>
      + *     <interceptor name="validator" class="org.apache.struts2.validator.ValidationInterceptor"/>
        * 
        * 
      * diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorFileParser.java b/core/src/main/java/org/apache/struts2/validator/ValidatorFileParser.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/validator/ValidatorFileParser.java rename to core/src/main/java/org/apache/struts2/validator/ValidatorFileParser.java index 1927ced83c..5fbb1d1508 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/ValidatorFileParser.java +++ b/core/src/main/java/org/apache/struts2/validator/ValidatorFileParser.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator; +package org.apache.struts2.validator; import java.io.InputStream; import java.util.List; @@ -41,7 +41,7 @@ * @author Rob Harrop * @author Rene Gielen * - * @see com.opensymphony.xwork2.validator.ValidatorConfig + * @see org.apache.struts2.validator.ValidatorConfig */ public interface ValidatorFileParser { /** diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ConditionalVisitorFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/ConditionalVisitorFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/ConditionalVisitorFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/ConditionalVisitorFieldValidator.java index 693fb8faf4..8915837df7 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ConditionalVisitorFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/ConditionalVisitorFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ConversionErrorFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/ConversionErrorFieldValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/ConversionErrorFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/ConversionErrorFieldValidator.java index b76cea8fcb..97b9943d44 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ConversionErrorFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/ConversionErrorFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/CreditCardValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/CreditCardValidator.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/CreditCardValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/CreditCardValidator.java index 1a0bc7529f..c7eb204f0c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/CreditCardValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/CreditCardValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/CustomValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/CustomValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/CustomValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/CustomValidator.java index f4ca87b48c..0b95ffc53d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/CustomValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/CustomValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DateRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/DateRangeFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/DateRangeFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/DateRangeFieldValidator.java index 69c9291dee..d3fa0bb7ef 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DateRangeFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/DateRangeFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/DoubleRangeFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/DoubleRangeFieldValidator.java index c617fbecf9..08c7857dd5 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/DoubleRangeFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/EmailValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/EmailValidator.java index d42c343161..ad194e682b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/EmailValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ExpressionValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/ExpressionValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/ExpressionValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/ExpressionValidator.java index 51a641343a..4dfda8a950 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ExpressionValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/ExpressionValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/FieldExpressionValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/FieldExpressionValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/FieldExpressionValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/FieldExpressionValidator.java index 51c28be6ba..12b4f9c091 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/FieldExpressionValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/FieldExpressionValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/IntRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/IntRangeFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/IntRangeFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/IntRangeFieldValidator.java index bcf438a742..f7c7b80197 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/IntRangeFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/IntRangeFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/LongRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/LongRangeFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/LongRangeFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/LongRangeFieldValidator.java index 1234da5b2f..17240f3d5b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/LongRangeFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/LongRangeFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/RegexFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/RegexFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/RegexFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/RegexFieldValidator.java index 186f39f4d1..a415738d66 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/RegexFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/RegexFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/RequiredFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/RequiredFieldValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/RequiredFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/RequiredFieldValidator.java index 55548cf5b4..9770266106 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/RequiredFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/RequiredFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/RequiredStringValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/RequiredStringValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/RequiredStringValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/RequiredStringValidator.java index 9636a4ce48..9ce425a7b3 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/RequiredStringValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/RequiredStringValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ShortRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/ShortRangeFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/ShortRangeFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/ShortRangeFieldValidator.java index 66143530ca..0d419ab8a8 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ShortRangeFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/ShortRangeFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/StringLengthFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/StringLengthFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/StringLengthFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/StringLengthFieldValidator.java index e9e9833f8b..1f596a94d8 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/StringLengthFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/StringLengthFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/UrlValidator.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/UrlValidator.java index 9bac722ecc..5b144a9ab0 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/UrlValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ValidationParameter.java b/core/src/main/java/org/apache/struts2/validator/annotations/ValidationParameter.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/ValidationParameter.java rename to core/src/main/java/org/apache/struts2/validator/annotations/ValidationParameter.java index 04b80d30e4..7a8cdeee61 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ValidationParameter.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/ValidationParameter.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/Validations.java b/core/src/main/java/org/apache/struts2/validator/annotations/Validations.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/Validations.java rename to core/src/main/java/org/apache/struts2/validator/annotations/Validations.java index e4925ae1aa..87c89d2fbb 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/Validations.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/Validations.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ValidatorType.java b/core/src/main/java/org/apache/struts2/validator/annotations/ValidatorType.java similarity index 95% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/ValidatorType.java rename to core/src/main/java/org/apache/struts2/validator/annotations/ValidatorType.java index 9d9c5e80f8..96d7c6d29b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/ValidatorType.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/ValidatorType.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; /** * ValidatorType diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/VisitorFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/annotations/VisitorFieldValidator.java similarity index 99% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/VisitorFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/annotations/VisitorFieldValidator.java index c8e7146b26..d9ed17bd0b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/VisitorFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/annotations/VisitorFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.annotations; +package org.apache.struts2.validator.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/package.html b/core/src/main/java/org/apache/struts2/validator/annotations/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/validator/annotations/package.html rename to core/src/main/java/org/apache/struts2/validator/annotations/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/package.html b/core/src/main/java/org/apache/struts2/validator/package.html similarity index 100% rename from core/src/main/java/com/opensymphony/xwork2/validator/package.html rename to core/src/main/java/org/apache/struts2/validator/package.html diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ConditionalVisitorFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/ConditionalVisitorFieldValidator.java similarity index 96% rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/ConditionalVisitorFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/validators/ConditionalVisitorFieldValidator.java index f0ef9dbc73..242ea7ea7c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ConditionalVisitorFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/validators/ConditionalVisitorFieldValidator.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.validators; +package org.apache.struts2.validator.validators; -import com.opensymphony.xwork2.validator.ValidationException; +import org.apache.struts2.validator.ValidationException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ConversionErrorFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/ConversionErrorFieldValidator.java similarity index 91% rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/ConversionErrorFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/validators/ConversionErrorFieldValidator.java index 94e0d7eade..03ea36a9dd 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ConversionErrorFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/validators/ConversionErrorFieldValidator.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.validators; +package org.apache.struts2.validator.validators; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.conversion.impl.ConversionData; -import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.validator.ValidationException; +import org.apache.struts2.ActionContext; +import org.apache.struts2.conversion.impl.ConversionData; +import org.apache.struts2.conversion.impl.XWorkConverter; +import org.apache.struts2.validator.ValidationException; import org.apache.commons.lang3.StringUtils; import java.util.Map; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/CreditCardValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/CreditCardValidator.java similarity index 97% rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/CreditCardValidator.java rename to core/src/main/java/org/apache/struts2/validator/validators/CreditCardValidator.java index 4f8d3e239f..084fed23ff 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/CreditCardValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/validators/CreditCardValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.validators; +package org.apache.struts2.validator.validators; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/DateRangeFieldValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/validators/DateRangeFieldValidator.java index 2159bf7c0c..e84744815b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/validators/DateRangeFieldValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.validators; +package org.apache.struts2.validator.validators; import java.util.Date; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/DoubleRangeFieldValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java rename to core/src/main/java/org/apache/struts2/validator/validators/DoubleRangeFieldValidator.java index 214e4ed186..cc571cebf1 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/validators/DoubleRangeFieldValidator.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.validators; +package org.apache.struts2.validator.validators; -import com.opensymphony.xwork2.validator.ValidationException; +import org.apache.struts2.validator.ValidationException; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/EmailValidator.java similarity index 98% rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java rename to core/src/main/java/org/apache/struts2/validator/validators/EmailValidator.java index 92c779152d..636b5f8d87 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java +++ b/core/src/main/java/org/apache/struts2/validator/validators/EmailValidator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package com.opensymphony.xwork2.validator.validators; +package org.apache.struts2.validator.validators; /** * @@ -30,8 +30,8 @@ * * You can also specify expression, caseSensitive and trim params as a OGNL expression, see the example below. * - * - * + * + * * *
        *
      • fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required
      • @@ -42,7 +42,7 @@ * * Do not use ${regexExpression}, ${caseSensitiveExpression} and ${trimExpression} as an expression as this will turn into infinitive loop! * - * + * *
          * 
          *     <!-- Plain Validator Syntax -->
        @@ -52,7 +52,7 @@
          *             <message>Must provide a valid email</message>
          *         </validator>
          *     </validators>
        - *     
        + *
          *     <!-- Field Validator Syntax -->
          *     <field name="myEmail">
          *        <field-validator type="email">
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ExpressionValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/ExpressionValidator.java
        similarity index 95%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/ExpressionValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/ExpressionValidator.java
        index 88753fb0fc..ab1c740c1d 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ExpressionValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/ExpressionValidator.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
         
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/FieldExpressionValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/FieldExpressionValidator.java
        similarity index 96%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/FieldExpressionValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/FieldExpressionValidator.java
        index 68f875ebef..0a9a739d04 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/FieldExpressionValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/FieldExpressionValidator.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
         
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/FieldValidatorSupport.java b/core/src/main/java/org/apache/struts2/validator/validators/FieldValidatorSupport.java
        similarity index 93%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/FieldValidatorSupport.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/FieldValidatorSupport.java
        index 61d0ea7633..70bb07808e 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/FieldValidatorSupport.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/FieldValidatorSupport.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.FieldValidator;
        +import org.apache.struts2.validator.FieldValidator;
         
         /**
          * Base class for field validators.
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/IntRangeFieldValidator.java
        similarity index 98%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/IntRangeFieldValidator.java
        index 25b98a1383..e3ec01944c 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/IntRangeFieldValidator.java
        @@ -16,7 +16,7 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
         /**
          * 
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/LongRangeFieldValidator.java
        similarity index 98%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/LongRangeFieldValidator.java
        index 028b4c2f85..ce1f7bf1e4 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/LongRangeFieldValidator.java
        @@ -16,7 +16,7 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
         /**
          * 
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RangeValidatorSupport.java b/core/src/main/java/org/apache/struts2/validator/validators/RangeValidatorSupport.java
        similarity index 97%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/RangeValidatorSupport.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/RangeValidatorSupport.java
        index b713262c56..f9a9db82bf 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RangeValidatorSupport.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/RangeValidatorSupport.java
        @@ -16,11 +16,11 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
         import org.apache.logging.log4j.Logger;
         import org.apache.logging.log4j.LogManager;
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         import org.apache.commons.lang3.StringUtils;
         
         import java.util.Collection;
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/RegexFieldValidator.java
        similarity index 98%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/RegexFieldValidator.java
        index c05dd8a024..79db732aa2 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/RegexFieldValidator.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         import org.apache.commons.lang3.StringUtils;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java b/core/src/main/java/org/apache/struts2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
        similarity index 95%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
        index 2e3b35d15f..7987b84f6c 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
        @@ -16,13 +16,13 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.ActionContext;
        -import com.opensymphony.xwork2.ActionInvocation;
        -import com.opensymphony.xwork2.conversion.impl.ConversionData;
        -import com.opensymphony.xwork2.util.ValueStack;
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.ActionContext;
        +import org.apache.struts2.ActionInvocation;
        +import org.apache.struts2.conversion.impl.ConversionData;
        +import org.apache.struts2.util.ValueStack;
        +import org.apache.struts2.validator.ValidationException;
         import org.apache.commons.text.StringEscapeUtils;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RequiredFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/RequiredFieldValidator.java
        similarity index 95%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/RequiredFieldValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/RequiredFieldValidator.java
        index b6492a9ee6..9bc94e3901 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RequiredFieldValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/RequiredFieldValidator.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         
         import java.lang.reflect.Array;
         import java.util.Collection;
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RequiredStringValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/RequiredStringValidator.java
        similarity index 97%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/RequiredStringValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/RequiredStringValidator.java
        index 9c1869932a..a8a7be1363 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/RequiredStringValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/RequiredStringValidator.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         
         import java.util.Collection;
         
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/ShortRangeFieldValidator.java
        similarity index 98%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/ShortRangeFieldValidator.java
        index b7e3cb8435..02d3244519 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/ShortRangeFieldValidator.java
        @@ -16,7 +16,7 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
         /**
          * 
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/StringLengthFieldValidator.java
        similarity index 98%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/StringLengthFieldValidator.java
        index 335d675476..88bb1020a2 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/StringLengthFieldValidator.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         import org.apache.commons.lang3.StringUtils;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/URLValidator.java
        similarity index 97%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/URLValidator.java
        index 7093ab7128..be09cfb91c 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/URLValidator.java
        @@ -16,9 +16,9 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        +package org.apache.struts2.validator.validators;
         
        -import com.opensymphony.xwork2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidationException;
         import org.apache.commons.lang3.StringUtils;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java b/core/src/main/java/org/apache/struts2/validator/validators/ValidatorSupport.java
        similarity index 91%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/ValidatorSupport.java
        index e1a79f6b16..4362884e37 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/ValidatorSupport.java
        @@ -16,17 +16,17 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        -
        -import com.opensymphony.xwork2.TextProviderFactory;
        -import com.opensymphony.xwork2.inject.Inject;
        -import com.opensymphony.xwork2.util.TextParseUtil;
        -import com.opensymphony.xwork2.util.ValueStack;
        -import com.opensymphony.xwork2.validator.DelegatingValidatorContext;
        -import com.opensymphony.xwork2.validator.ShortCircuitableValidator;
        -import com.opensymphony.xwork2.validator.ValidationException;
        -import com.opensymphony.xwork2.validator.Validator;
        -import com.opensymphony.xwork2.validator.ValidatorContext;
        +package org.apache.struts2.validator.validators;
        +
        +import org.apache.struts2.TextProviderFactory;
        +import org.apache.struts2.inject.Inject;
        +import org.apache.struts2.util.TextParseUtil;
        +import org.apache.struts2.util.ValueStack;
        +import org.apache.struts2.validator.DelegatingValidatorContext;
        +import org.apache.struts2.validator.ShortCircuitableValidator;
        +import org.apache.struts2.validator.ValidationException;
        +import org.apache.struts2.validator.Validator;
        +import org.apache.struts2.validator.ValidatorContext;
         import org.apache.commons.lang3.StringUtils;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/VisitorFieldValidator.java b/core/src/main/java/org/apache/struts2/validator/validators/VisitorFieldValidator.java
        similarity index 93%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/VisitorFieldValidator.java
        rename to core/src/main/java/org/apache/struts2/validator/validators/VisitorFieldValidator.java
        index eb07a233c6..3b4d87805e 100644
        --- a/core/src/main/java/com/opensymphony/xwork2/validator/validators/VisitorFieldValidator.java
        +++ b/core/src/main/java/org/apache/struts2/validator/validators/VisitorFieldValidator.java
        @@ -16,17 +16,17 @@
          * specific language governing permissions and limitations
          * under the License.
          */
        -package com.opensymphony.xwork2.validator.validators;
        -
        -import com.opensymphony.xwork2.ActionContext;
        -import com.opensymphony.xwork2.CompositeTextProvider;
        -import com.opensymphony.xwork2.TextProvider;
        -import com.opensymphony.xwork2.inject.Inject;
        -import com.opensymphony.xwork2.util.ValueStack;
        -import com.opensymphony.xwork2.validator.ActionValidatorManager;
        -import com.opensymphony.xwork2.validator.DelegatingValidatorContext;
        -import com.opensymphony.xwork2.validator.ValidationException;
        -import com.opensymphony.xwork2.validator.ValidatorContext;
        +package org.apache.struts2.validator.validators;
        +
        +import org.apache.struts2.ActionContext;
        +import org.apache.struts2.CompositeTextProvider;
        +import org.apache.struts2.TextProvider;
        +import org.apache.struts2.inject.Inject;
        +import org.apache.struts2.util.ValueStack;
        +import org.apache.struts2.validator.ActionValidatorManager;
        +import org.apache.struts2.validator.DelegatingValidatorContext;
        +import org.apache.struts2.validator.ValidationException;
        +import org.apache.struts2.validator.ValidatorContext;
         import org.apache.logging.log4j.LogManager;
         import org.apache.logging.log4j.Logger;
         
        diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/validators/package.html b/core/src/main/java/org/apache/struts2/validator/validators/package.html
        similarity index 100%
        rename from core/src/main/java/com/opensymphony/xwork2/validator/validators/package.html
        rename to core/src/main/java/org/apache/struts2/validator/validators/package.html
        diff --git a/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java b/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java
        index f047b09d51..3b20eec265 100644
        --- a/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java
        +++ b/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java
        @@ -18,7 +18,7 @@
          */
         package org.apache.struts2.views;
         
        -import com.opensymphony.xwork2.util.ValueStack;
        +import org.apache.struts2.util.ValueStack;
         import org.apache.struts2.views.freemarker.tags.StrutsModels;
         
         import jakarta.servlet.http.HttpServletRequest;
        @@ -31,7 +31,7 @@ public class DefaultTagLibrary implements TagLibraryModelProvider {
         
             public Object getModels(ValueStack stack, HttpServletRequest req,
                                     HttpServletResponse res) {
        -        
        +
                 return new StrutsModels(stack, req, res);
             }
         
        diff --git a/core/src/main/java/org/apache/struts2/views/TagLibraryModelProvider.java b/core/src/main/java/org/apache/struts2/views/TagLibraryModelProvider.java
        index bf97e9486f..d208aa4686 100644
        --- a/core/src/main/java/org/apache/struts2/views/TagLibraryModelProvider.java
        +++ b/core/src/main/java/org/apache/struts2/views/TagLibraryModelProvider.java
        @@ -18,7 +18,7 @@
          */
         package org.apache.struts2.views;
         
        -import com.opensymphony.xwork2.util.ValueStack;
        +import org.apache.struts2.util.ValueStack;
         
         import jakarta.servlet.http.HttpServletRequest;
         import jakarta.servlet.http.HttpServletResponse;
        diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
        index d3a90d4f25..ddc3682e6e 100644
        --- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
        +++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
        @@ -18,12 +18,12 @@
          */
         package org.apache.struts2.views.freemarker;
         
        -import com.opensymphony.xwork2.FileManager;
        -import com.opensymphony.xwork2.FileManagerFactory;
        -import com.opensymphony.xwork2.inject.Container;
        -import com.opensymphony.xwork2.inject.Inject;
        -import com.opensymphony.xwork2.util.ClassLoaderUtil;
        -import com.opensymphony.xwork2.util.ValueStack;
        +import org.apache.struts2.FileManager;
        +import org.apache.struts2.FileManagerFactory;
        +import org.apache.struts2.inject.Container;
        +import org.apache.struts2.inject.Inject;
        +import org.apache.struts2.util.ClassLoaderUtil;
        +import org.apache.struts2.util.ValueStack;
         import freemarker.cache.ClassTemplateLoader;
         import freemarker.cache.FileTemplateLoader;
         import freemarker.cache.MultiTemplateLoader;
        diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
        index d09d542925..aa81626966 100644
        --- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
        +++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
        @@ -18,11 +18,11 @@
          */
         package org.apache.struts2.views.freemarker;
         
        -import com.opensymphony.xwork2.ActionContext;
        -import com.opensymphony.xwork2.ActionInvocation;
        -import com.opensymphony.xwork2.LocaleProvider;
        -import com.opensymphony.xwork2.inject.Inject;
        -import com.opensymphony.xwork2.util.ValueStack;
        +import org.apache.struts2.ActionContext;
        +import org.apache.struts2.ActionInvocation;
        +import org.apache.struts2.LocaleProvider;
        +import org.apache.struts2.inject.Inject;
        +import org.apache.struts2.util.ValueStack;
         import freemarker.template.Configuration;
         import freemarker.template.ObjectWrapper;
         import freemarker.template.Template;
        diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java
        index e25143d63b..8ed44de698 100644
        --- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java
        +++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java
        @@ -26,7 +26,7 @@
         import org.apache.struts2.components.template.Template;
         import org.apache.struts2.components.template.TemplateEngine;
         
        -import com.opensymphony.xwork2.inject.Inject;
        +import org.apache.struts2.inject.Inject;
         
         import freemarker.cache.TemplateLoader;
         
        @@ -63,10 +63,10 @@ public Object findTemplateSource(String name) throws IOException {
                 }
         
                 Template template = new Template(
        -            name.substring(0, tokenIndex - 1), 
        -            name.substring(tokenIndex + themeExpansionToken.length(), themeEndIndex), 
        +            name.substring(0, tokenIndex - 1),
        +            name.substring(tokenIndex + themeExpansionToken.length(), themeEndIndex),
                     name.substring(themeEndIndex + 1));
        -        
        +
                 List