users@jaxb.java.net

Re: jaxb and null values

From: Brandon Franklin <brandon_at_thoughtriver.com>
Date: Thu, 08 May 2003 23:20:27 +0930

I would take that a step further, and say that if you do NOT have
"minOccurs=0" in there, and then supply a null value, you have an invalid
document, which in fact SHOULD produce errors.

If I recall correctly, the default value of minOccurs (and maxOccurs, for
that matter) is always 1 unless you change it.

In other words, this is not a mistake on the part of JAXB, but rather an
error in your XML document.


----- Original Message -----
From: "Andrew Wellman" <aj_at_wellmans.com>
To: <JAXB-INTEREST_at_JAVA.SUN.COM>
Sent: Thursday, May 08, 2003 9:43 PM
Subject: Re: jaxb and null values


> If you delcare elements with minOccurrs="0", JAXB will do a null check.
>
> On Thu, 8 May 2003 10:52:43 +0100
> Tim Davidson <tim.davidson_at_greenhatconsulting.com> wrote:
>
> > Does anyone know if Jaxb can cope with null values?
> >
> > We have null values in the java class and Jaxb throws errors when any of
the values are null.
> >
> > if this a bug? can anone help?
> >
>