/**
* Test for XMLRPC-140.
*/
public void testXMLRPC140() throws Exception {
DateParser parser = new DateParser(new XmlRpcDateTimeFormat(){
private static final long serialVersionUID = 0L;
protected TimeZone getTimeZone() {
return TimeZone.getDefault();
}
}){
public void setResult(Object pObject){
try {
super.setResult((String) pObject);
} catch (SAXException e) {
throw new UndeclaredThrowableException(e);
}
}
};
try {
parser.setResult("20070316T162808Z");
fail("Expected exception");
} catch (UndeclaredThrowableException e) {
SAXParseException spe = (SAXParseException) e.getUndeclaredThrowable();
ParseException pe = (ParseException) spe.getException();
assertEquals(11, pe.getErrorOffset());