You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2008/05/08 10:48:10 UTC
svn commit: r654447 - in /ant/ivy/core/trunk: CHANGES.txt
src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
Author: hibou
Date: Thu May 8 01:48:10 2008
New Revision: 654447
URL: http://svn.apache.org/viewvc?rev=654447&view=rev
Log:
IVY-815: SFTPRepository incorrectly calculates last modified time for resources
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=654447&r1=654446&r2=654447&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu May 8 01:48:10 2008
@@ -44,6 +44,7 @@
Stephen Nesbitt
Joshua Nichols
Bernard Niset
+ David Maplesden
Glen Marchesani
Mathias Muller
Peter Oxenham
@@ -79,6 +80,7 @@
- IMPROVEMENT: Change allownomd and skipbuildwithoutivy into a more semantically correct name (IVY-297)
- IMPROVEMENT: Smarter determination if an expression is exact or not for RegexpPatternMatcher and GlobPatternMatcher
+- FIX: SFTPRepository incorrectly calculates last modified time for resources (IVY-815)
- FIX: Filesystem resolver does not evaluate [branch] token when publishing (IVY-814)
- FIX: Using ivy:settings with the "id" attribute not behaving as expected (IVY-809)
- FIX: onMissingDescriptor doesn't work due to == comparison (IVY-805) (thanks to Ben Hale)
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java?rev=654447&r1=654446&r2=654447&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java Thu May 8 01:48:10 2008
@@ -46,7 +46,9 @@
* 0, 1, 2 and 3
*/
public class SFTPRepository extends AbstractSshBasedRepository {
- private static final int MILLIS_PER_SECOND = 1000;
+ // this must be a long to ensure the multiplication done below uses longs
+ // instead of ints which are not big enough to hold the result
+ private static final long MILLIS_PER_SECOND = 1000;
private final class MyProgressMonitor implements SftpProgressMonitor {
private long totalLength;
@@ -92,8 +94,8 @@
if (obj instanceof LsEntry) {
LsEntry entry = (LsEntry) obj;
SftpATTRS attrs = entry.getAttrs();
- return new BasicResource(path, true, attrs.getSize(),
- attrs.getMTime() * MILLIS_PER_SECOND, false);
+ return new BasicResource(path, true, attrs.getSize(), attrs.getMTime()
+ * MILLIS_PER_SECOND, false);
}
}
}