Cleans up code a bit

This commit is contained in:
Lukasz Lenart
2018-03-23 08:51:06 +01:00
parent 197ecae617
commit 4e94b5bed8
2 changed files with 4 additions and 17 deletions
@@ -83,11 +83,6 @@ public class ActionContext implements Serializable {
*/
public static final String LOCALE = "com.opensymphony.xwork2.ActionContext.locale";
/**
* Constant for the action's type converter.
*/
public static final String TYPE_CONVERTER = "com.opensymphony.xwork2.ActionContext.typeConverter";
/**
* Constant for the action's {@link com.opensymphony.xwork2.ActionInvocation invocation} context.
*/
@@ -170,22 +165,13 @@ public class ActionContext implements Serializable {
return actionContext.get();
}
/**
* Sets the action's context map.
*
* @param contextMap the context map.
*/
public void setContextMap(Map<String, Object> contextMap) {
getContext().context = contextMap;
}
/**
* Gets the context map.
*
* @return the context map.
*/
public Map<String, Object> getContextMap() {
return new HashMap<>(getContext().context);
return getContext().context;
}
/**
@@ -88,8 +88,9 @@ public class ActionContextTest extends XWorkTestCase {
public void testContextMap() {
Map<String, Object> map = new HashMap<>();
context.setContextMap(map);
assertEquals(map, context.getContextMap());
ActionContext.setContext(new ActionContext(map));
assertEquals(map, ActionContext.getContext().getContextMap());
}
public void testParameters() {