commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r633381 - /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
Date Tue, 04 Mar 2008 07:40:47 GMT
Author: rwinston
Date: Mon Mar  3 23:40:45 2008
New Revision: 633381

URL: http://svn.apache.org/viewvc?rev=633381&view=rev
Log:
Remove specific isLeapYear() check, to handle other cases (such as Apr 26 02:00 in US/Central
timezone). See NET-188

Modified:
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java?rev=633381&r1=633380&r2=633381&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
Mon Mar  3 23:40:45 2008
@@ -101,8 +101,7 @@
 			// e.g. Java's DateFormatter will assume that "Feb 29 12:00" refers to 
 			// Feb 29 1970 (an invalid date) rather than a potentially valid leap year date.
 			// This is pretty bad hack to work around the deficiencies of the JDK date/time classes.
-			if (recentDateFormat != null && 
-					new GregorianCalendar().isLeapYear(now.get(Calendar.YEAR))) {
+			if (recentDateFormat != null) {
 				pp = new ParsePosition(0);
 				int year = Calendar.getInstance().get(Calendar.YEAR);
 				String timeStampStrPlusYear = timestampStr + " " + year;



Mime
View raw message