Greetings,
There is a bug in the implementation of toBean() for non-DynaBeans,
where for any non-primitive property, setting to null always attempts a
(Map) cast (JSONObject.java, line 396), which fails abruptly with a
ClassCastException. Changing && to || (line 392) fixes this -- though
it doesn't technically set it to null, as it perhaps should. But I
haven't investigated the utility enough to understand the ramifications
of doing this.
Fred
|