Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-1
-
Component/s: nanowar
-
Labels:None
-
Environment:Tomcat 5.0.19, ognl 2.5.1
-
Number of attachments :
Description
A HttpServletRequest has the URI keywords as keys, and String[] as values. I don't understand the intention of setPropertiesWithOgnl():
Object value = parameterMap.get(parameterKey);
if (value instanceof String[])
try
{ Ognl.setValue(parameterKey, action, value); }catch (OgnlException e)
{ e.printStackTrace(); throw new ServletException(e); }Why convert to Arrays.asList()? I did a test with Ognl standalone. It can match String[] as input, for a String[] property. With the current code, it will yield:
java.lang.NoSuchMethodException: setNumber(java.util.Arrays$ArrayList)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:551)
...
Where it doesn't match the internal ArrayList used by Arrays.asList().
Activity
Aslak Hellesøy
made changes -
Field | Original Value | New Value |
---|---|---|
Resolution | Fixed [ 1 ] | |
Fix Version/s | 1.0-beta-1 [ 10147 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Assignee | Aslak Hellesoy [ rinkrank ] |
Fixed. Both arrays and lists are supported now. (First try array, if it fails try list).