users@jaxb.java.net

Date

From: Vallamshettla, Anand <Anand.Vallamshettla_at_tgslc.org>
Date: Wed, 15 Feb 2006 11:24:41 -0600

I have 2 question regarding xs:date type handling in JAXB 1.0

 

1) When the xs:date type element in XML file is set to 0000-00-00, after
parsing the Calendar object has a value of 0002-11-30. It is giving me a
gibberish date, it should have thrown an exception or something so that
we know something is wrong with the file. I was wondering how the rest
of you are handling this situation.

 

2) When the xs:date type element in XML file is set to 2005-13-12, date
is being converted to 2006-01-12 as lenient feature is set by default on
Calendar. Is there a way to set lenient off on Calendar type with minor
customization and let JAXB throw exception those cases?

 

Av