dev@jaxb.java.net

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

From: jviswana <jviswana_at_linux.vnet.ibm.com>
Date: Tue, 09 Aug 2011 13:43:43 +0530

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