Re: [json-lib-user] Bug in toBean() for non-DynaBeans
Brought to you by:
aalmiray
From: Andres A. <aal...@ya...> - 2006-09-06 19:24:59
|
Hi Frederick, you are right, it is a bug. There shouldn't be an specific cast to Map in line 396. I'll add it to the bug database and get it fixed. Thanks for spotting it =] Cheers. --- Frederick Polgardy <fpo...@po...> escribió: > 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 > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support > web services, security? > Get stuff done quickly with pre-integrated > technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 > based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> _______________________________________________ > json-lib-user mailing list > jso...@li... > https://lists.sourceforge.net/lists/listinfo/json-lib-user > ___________________________________________________________ Do You Yahoo!? La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx |