2006/unicorn/org/w3c/unicorn/response/parser DefaultParser.java,1.3,1.4

Update of /sources/public/2006/unicorn/org/w3c/unicorn/response/parser
In directory hutz:/tmp/cvs-serv24377/org/w3c/unicorn/response/parser

Modified Files:
	DefaultParser.java 
Log Message:
Now avoids an error where there's no date in the response.

Index: DefaultParser.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/response/parser/DefaultParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- DefaultParser.java	10 Jul 2008 14:49:52 -0000	1.3
+++ DefaultParser.java	27 Aug 2008 11:54:53 -0000	1.4
@@ -368,15 +368,17 @@
 		res.setCheckedby(or.getCheckedby());
 		res.setVersion(or.getVersion());
 		XMLGregorianCalendar xmlGregorianCalendar;
+		if (or.getDate()!=null)
 		try {
 			xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar((GregorianCalendar)or.getDate());
+			or.setDate(Calendar.getInstance());
+			res.setDate(xmlGregorianCalendar);
 		} catch (DatatypeConfigurationException e) {
 			e.printStackTrace();
 			logger.error("DatatypeConfigurationException erreur de date : " + e.getMessage(), e);
 			return null;
 		}
-		or.setDate(Calendar.getInstance());
-		res.setDate(xmlGregorianCalendar);
+
 		res.setPassed(or.getPassed());
 
 		// Fill res.result

Received on Wednesday, 27 August 2008 11:55:30 UTC