Avoid NPE if pubdate is null for some reason...
authorMaarten Coene <maartenc@apache.org>
Thu, 18 Jun 2009 20:47:41 +0000 (20:47 +0000)
committerMaarten Coene <maartenc@apache.org>
Thu, 18 Jun 2009 20:47:41 +0000 (20:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@786260 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/ivy/plugins/report/XmlReportParser.java

index 0392598..d094d11 100644 (file)
@@ -104,7 +104,10 @@ public class XmlReportParser {
                             realMrids.add(mrid);
                         }
                         try {
-                            pubdate = Ivy.DATE_FORMAT.parse(attributes.getValue("pubdate"));
+                            String pubDateAttr = attributes.getValue("pubdate");
+                            if (pubDateAttr != null) {
+                                pubdate = Ivy.DATE_FORMAT.parse(pubDateAttr);
+                            }
                             skip = false;
                         } catch (ParseException e) {
                             throw new IllegalArgumentException("invalid publication date for "