JavaUtils.convert does not work if the second argument is List.class .
It does no conversion and returns the object as it is. The problem is at
line 320.
315 List newList = null;
316 try {
317 newList = (List)destClass.newInstance();
318 } catch (Exception e) {
319 // Couldn't build one for some reason... so forget
it.
320 return arg;
321 }
I think line 320 should be replaced by something like this
if (destClass==List.class) {
// if he is interested in a List, it does not
matter what
// implementation we give him
newList = new java.util.ArrayList();
} else {
return arg;
}
This caused my bean property that is a List not to be deserialised
correctly. Is my reasoning right? If yes, could someone commit the
change.
Please CC me on your reply, I am not on the list.
thanks
Vikram