You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/07/11 23:30:09 UTC
svn commit: r1690410 - in /commons/proper/net/trunk/src: changes/changes.xml
main/java/org/apache/commons/net/ftp/FTPClient.java
Author: sebb
Date: Sat Jul 11 21:30:09 2015
New Revision: 1690410
URL: http://svn.apache.org/r1690410
Log:
NET-558 - getModificationTime(<filename>) returns complete received line including response code and EOL
Modified:
commons/proper/net/trunk/src/changes/changes.xml
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1690410&r1=1690409&r2=1690410&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/net/trunk/src/changes/changes.xml [utf-8] Sat Jul 11 21:30:09 2015
@@ -115,7 +115,8 @@ This is mainly a bug-fix release. See fu
Simplify TelnetOptionHandler class hierarchy
</action>
<action issue="NET-558" type="fix" dev="sebb" due-to="Ralph Becker">
- FTPClient.getModificationTime(filename) returns complete received line including response code
+ FTPClient.getModificationTime(filename) returns complete received line including response code and EOL
+ Strip the response code and EOL
</action>
<action issue="NET-556" type="update" dev="sebb" due-to="Andy Rosa">
Make SubnetInfo.isInRange(int) public
Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1690410&r1=1690409&r2=1690410&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Sat Jul 11 21:30:09 2015
@@ -3527,7 +3527,7 @@ implements Configurable
*/
public String getModificationTime(String pathname) throws IOException {
if (FTPReply.isPositiveCompletion(mdtm(pathname))) {
- return getReplyString().substring(4); // skip the return code (e.g. 213) and the space
+ return getReplyStrings()[0].substring(4); // skip the return code (e.g. 213) and the space
}
return null;
}