ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r786260 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
Date Thu, 18 Jun 2009 20:47:41 GMT
Author: maartenc
Date: Thu Jun 18 20:47:41 2009
New Revision: 786260

URL: http://svn.apache.org/viewvc?rev=786260&view=rev
Log:
Avoid NPE if pubdate is null for some reason...

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java?rev=786260&r1=786259&r2=786260&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/XmlReportParser.java Thu Jun
18 20:47:41 2009
@@ -104,7 +104,10 @@
                             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 "



Mime
View raw message