Description
The changes to RequestUtils associated with STR-487 cause my application to throw "java.lang.ClassCastException: java.util.ArrayList"
http://svn.apache.org/viewvc?view=rev&revision=524895
I use LazyDynaBean which returns Object.class as the property type of any property which is not defined (since null would indicate no property and one of the "lazy" features is to add properties automatically on "set"). Theres a bug in the changes for r524895 which is using the Class's isAssignableFrom() method the wrong way round:
propertyType.isAssignableFrom(List.class)
The above will return "true" when propertyType is "Object.class" - and so a List is created which my application is not expecting (it expects a FormFile). I believe the above will also fail if the property type is an ArrayList which is also not desirable - correct code should be:
List.class.isAssignableFrom(propertyType)
Attachments
Issue Links
- relates to
-
STR-487 Multiple file upload not possible due to MultiPartRequestHandler limitation?
- Closed