JibxException thrown from org.jibx.runtime.Utility when attempting to 
deserializeDate on valid xml schema date format.  
------------------------------------------------------------------------------------------------------------------------

                 Key: JIBX-185
                 URL: http://jira.codehaus.org/browse/JIBX-185
             Project: JiBX
          Issue Type: Bug
          Components: core
    Affects Versions: JiBX 1.1.5
         Environment: mac osx w/ Java 1.5
            Reporter: Hardip Singh


according to w3c xml schema spec, date formats can be defined as 
'YYYY-MM-DD-hh:mm".

When attempting to deserialize this format using the org.jibx.runtime.Utility 
deserializeDate method, a jibxexception is thrown upon validation.

Below is a simple testcase showing this....  I poked around the source and 
found that the validateDate method does not recognize this format as a valid 
date format. 

package foo.test.jibx;

import junit.framework.TestCase;
import org.jibx.runtime.Utility;
import org.jibx.runtime.JiBXException;
import java.util.Date;

public class JibxDateFormatTest extends TestCase
{
        public void testDateSerializationWithTimeZone() throws Exception
        {
                String dateStr = "1950-10-01-02:00";                    
                try {
                        Date date = Utility.deserializeDate(dateStr);
                        assertNotNull(date);
                }
                catch (JiBXException ex)
                {
                        ex.printStackTrace();
                        assertTrue(false);
                }               
        }       
}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to