maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r745732 - /maven/wagon/trunk/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
Date Thu, 19 Feb 2009 05:23:08 GMT
Author: brett
Date: Thu Feb 19 05:23:07 2009
New Revision: 745732

URL: http://svn.apache.org/viewvc?rev=745732&view=rev
Log:
[WAGON-242] guard against NPE

Modified:
    maven/wagon/trunk/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java?rev=745732&r1=745731&r2=745732&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
Thu Feb 19 05:23:07 2009
@@ -25,6 +25,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.List;
 
 import org.apache.commons.net.ProtocolCommandEvent;
@@ -353,7 +354,8 @@
             //@todo check how it works! javadoc of common login says:
             // Returns the file timestamp. This usually the last modification time.
             //
-            long lastModified = ftpFiles[0].getTimestamp().getTimeInMillis();
+            Calendar timestamp = ftpFiles[0].getTimestamp();
+            long lastModified = timestamp != null ? timestamp.getTimeInMillis() : 0;
 
             resource.setContentLength( contentLength );
 



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message