commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r637642 - in /commons/proper/net/branches/NET_2_0/src: main/java/org/apache/commons/net/ftp/ main/java/org/apache/commons/net/ftp/parser/ test/java/org/apache/commons/net/ftp/parser/
Date Sun, 16 Mar 2008 20:19:39 GMT
Author: rwinston
Date: Sun Mar 16 13:19:37 2008
New Revision: 637642

URL: http://svn.apache.org/viewvc?rev=637642&view=rev
Log:
NET-201

Modified:
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClient.java
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
    commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=637642&r1=637641&r2=637642&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClient.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClient.java
Sun Mar 16 13:19:37 2008
@@ -2363,7 +2363,9 @@
     
     /**
      * Issue the FTP MDTM command (not supported by all servers to retrieve the last
-     * modification time of a file. The modification string should be in the form "YYYYMMDDhhmmss"
+     * modification time of a file. The modification string should be in the 
+     * ISO 3077 form "YYYYMMDDhhmmss(.xxx)?". The timestamp represented should also be in

+     * GMT, but not all FTP servers honour this.
      * 
      * @param pathname The file path to query.
      * @return A string representing the last file modification time in <code>YYYYMMDDhhmmss</code>
format.

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?rev=637642&r1=637641&r2=637642&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
Sun Mar 16 13:19:37 2008
@@ -87,7 +87,7 @@
         + "(\\d+)\\s+"
         + "(?:(\\S+(?:\\s\\S+)*?)\\s+)?"					// owner name (optional spaces)
         + "(?:(\\S+(?:\\s\\S+)*)\\s+)?" 				// group name (optional spaces)
-        + "(\\d+)\\s+"
+        + "(\\d+(?:,\\s*\\d+)?)\\s+"
         
         /*
           numeric or standard format date

Modified: commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java?rev=637642&r1=637641&r2=637642&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
Sun Mar 16 13:19:37 2008
@@ -72,7 +72,9 @@
 			"drwxrwx---+ 23 500     500    0 Jan 10 13:09 testACL",
 			"-rw-r--r--   1 1        3518644 May 25 12:12 std",
             "lrwxrwxrwx   1 neeme neeme             23 Mar  2 18:06 macros -> ./../../global/macros/.",
-			"-rw-r--r--   1 ftp      group with spaces in it as allowed in cygwin see bug 38634  
83853 Jan 22  2001 zxJDBC-1.2.4.tar.gz"
+			"-rw-r--r--   1 ftp      group with spaces in it as allowed in cygwin see bug 38634  
83853 Jan 22  2001 zxJDBC-1.2.4.tar.gz",
+			"crw-r----- 1 root kmem 0, 27 Jan 30 11:42 kmem",  //FreeBSD device
+			"crw-------   1 root     sys      109,767 Jul  2  2004 pci@1c,600000:devctl" //Solaris
device
 
 
 		};
@@ -309,8 +311,8 @@
                 int pos = 3*access + perm + 1;
                 char permchar = test.charAt(pos);
                 assertEquals("Permission " + test.substring(1,10), 
-                        f.hasPermission(access, perm), 
-                        permchar != '-' && !Character.isUpperCase(permchar)); 
+                        new Boolean(f.hasPermission(access, perm)), 
+                        new Boolean(permchar != '-' && !Character.isUpperCase(permchar)));

             }
         }
 



Mime
View raw message