From 3a569021dcf6bf51fb94e4750bddbc6ca1223a58 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Wed, 2 Sep 2009 23:07:36 +0000 Subject: [PATCH] fixed DateService to throw Exceptions instead of returning null git-svn-id: http://jclouds.googlecode.com/svn/trunk@1868 3d8758e0-26b5-11de-8745-db77d3ebf521 --- core/src/main/java/org/jclouds/util/DateService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/jclouds/util/DateService.java b/core/src/main/java/org/jclouds/util/DateService.java index 0b4cfcddd2..51bcf11da6 100644 --- a/core/src/main/java/org/jclouds/util/DateService.java +++ b/core/src/main/java/org/jclouds/util/DateService.java @@ -94,7 +94,7 @@ public class DateService { try { return new DateTime(rfc822SimpleDateFormat.parse(toParse)); } catch (ParseException e) { - return null; + throw new RuntimeException(e); } } } @@ -116,7 +116,7 @@ public class DateService { try { return new DateTime(iso8601SimpleDateFormat.parse(toParse)); } catch (ParseException e) { - return null; + throw new RuntimeException(e); } } }