dev@jaxb.java.net

Re: Fwd: JAXB:Invalid boolean values added to lists as 'false'

From: Martin Grebac <martin.grebac_at_oracle.com>
Date: Fri, 12 Aug 2011 11:01:36 +0200

Hi,
 the behaviour now currently matches as defined in spec, so I don't
think I want to change it at this point. I may be able to add some
switch to be able to revert to the older behaviour. If that would help,
file an issue please,
  MartiNG

On 08/09/2011 10:13 AM, jviswana wrote:
> Hi ,
>
> Can you please help with this one ?
>
> -------- Original Message --------
> Subject: JAXB:Invalid boolean values added to lists as 'false'
> Date: Thu, 28 Jul 2011 17:15:04 +0530
> From: jviswana <jviswana_at_linux.vnet.ibm.com>
> Reply-To: dev_at_jaxb.java.net
> To: dev_at_jaxb.java.net
>
>
>
> Hi,
>
> Sun bug number 6975714 , had a fix which further had broken some
> scenarios which used to work . When a JAXB class has a list property and
> the instance document contains invalid values for those elements, each
> of those invalid values is represented in the list with null. The JAXB
> RI is now writing false to the list for Boolean, while all other types
> (integers, longs, doubles, etc...) consistently write null.
>
> Current Results:
> Test(1) bools: [false, false, true, false]
> Test(2) ints: [null, null, 17, null]
>
> Previous Results: [Before the bug fix in 2.2.1 ]
> Test(1) bools: [null, null, true, null]
> Test(2) ints: [null, null, 17, null]
>
> I think the behavior should be like 2.2.1 where null was stored for
> invalid Boolean , like other types.
>
> Regards,
> Jayashree Viswanathan
>
>
>
>
>

-- 
Martin Grebac, GlassFish/Metro/JAXB/Tooling at Oracle
http://blogs.sun.com/mgrebac
ICQ: 93478885