Hi,
I have applied patch attached to WW-4250 [1] to support Chinese
characters as param names, but I figured out that I forgot to test
that patch. After launching ParametersInterceptorTest just one test
failed - testParametersWithSpacesInTheName:
public void testParametersWithSpacesInTheName() throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
params.put("theProtectedMap['p0 p1']", "test1");
params.put("theProtectedMap['p0p1 ']", "test2");
params.put("theProtectedMap[' p0p1 ']", "test3");
params.put("theProtectedMap[' p0 p1 ']", "test4");
HashMap<String, Object> extraContext = new HashMap<String, Object>();
extraContext.put(ActionContext.PARAMETERS, params);
ActionProxy proxy = actionProxyFactory.createActionProxy("",
MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, null,
extraContext);
proxy.execute();
Map<String, String> existingMap = ((SimpleAction)
proxy.getAction()).getTheProtectedMap();
assertEquals(0, existingMap.size());
}
I was trying to investigate why we removed support for spaces in param
names and just found this [2] - I cannot recall what it was :/ Even
checking the log [3] I'm not sure what was the reason - I assume
because of S2-008 [4]. Any thoughts?
[1] https://issues.apache.org/jira/browse/WW-4250
[2] https://svn.apache.org/viewvc?view=revision&revision=1225038
[3]
https://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java?view=log&pathrev=1558168
[4] https://cwiki.apache.org/confluence/display/WW/S2-008
Regards
--
Ćukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]