svn commit: r377587 - in /jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

2006-02-13 Thread scohen
Author: scohen
Date: Mon Feb 13 18:48:43 2006
New Revision: 377587

URL: http://svn.apache.org/viewcvs?rev=377587view=rev
Log:
Patch by David D. Kilzer.  bug 38634.  Fix problem with group names with spaces 
in them
(allowed by Windows, and therefore Cygwin).

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?rev=377587r1=377586r2=377587view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 Mon Feb 13 18:48:43 2006
@@ -89,7 +89,7 @@
 
+(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\+?\\s+
 + (\\d+)\\s+
 + (\\S+)\\s+
-+ (?:(\\S+)\\s+)?
++ (?:(\\S+(?:\\s\\S+)*)\\s+)?
 + (\\d+)\\s+
 
 /*

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java?rev=377587r1=377586r2=377587view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 Mon Feb 13 18:48:43 2006
@@ -36,7 +36,7 @@
drwxr-xr-x   2 root root 4096 Aug 36  2001 
zztpp,
-rw-r--r--   1 14   staff   80284 Aug 22  
zxJDBC-1.2.3.tar.gz,
-rw-r--r--   1 14   staff  119:26 Aug 22  2000 
zxJDBC-1.2.3.zip,
-   -rw-r--r--   1 ftp  no group83853 Jan 22  2001 
zxJDBC-1.2.4.tar.gz,
+   /*-rw-r--r--   1 ftp  no group83853 Jan 22  
2001 zxJDBC-1.2.4.tar.gz,*/
-rw-r--r--   1ftp   nogroup126552 Jan 22  2001 
zxJDBC-1.2.4.zip,
-rw-r--r--   1 root root   190144 2001-04-27 
zxJDBC-2.0.1b1.zip,
-rw-r--r--   1 root root   111325 Apr -7 18:79 
zxJDBC-2.0.1b1.tar.gz };
@@ -70,7 +70,9 @@
-rwsr-sr--   1 500  500 0 Mar 25 0:23 
testSuidExec2,
drwxrwx---+ 23 500 5000 Jan 10 13:09 testACL,
-rw-r--r--   1 13518644 May 25 12:12 std,
-lrwxrwxrwx   1 neeme neeme 23 Mar  2 18:06 macros - 
./../../global/macros/.
+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
+
 
};
 
@@ -202,13 +204,13 @@
public void testParseFieldsOnFile() throws Exception {
FTPFile f = getParser()
.parseFTPEntry(
-   -rwxr-xr-x   2 user group  
   50 Mar  2 15:13 zxbox);
+   -rwxr-xr-x   2 user my 
group 50050 Mar  2 15:13 zxbox);
assertNotNull(Could not parse entry., f);
assertTrue(Should have been a file., f.isFile());
checkPermissions(f);
assertEquals(2, f.getHardLinkCount());
assertEquals(user, f.getUser());
-   assertEquals(group, f.getGroup());
+   assertEquals(my group 500, f.getGroup());
assertEquals(zxbox, f.getName());
assertEquals(50L, f.getSize());
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r365822 - /jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java

2006-01-03 Thread scohen
Author: scohen
Date: Tue Jan  3 20:26:40 2006
New Revision: 365822

URL: http://svn.apache.org/viewcvs?rev=365822view=rev
Log:
Provide some further guidance to perplexed users who don't realize 
that the dependency on jakarta-oro exists, by catching the 
NoClassDefFoundError that is thrown when this happens, and wrap it in
an exception that explicitly tells user to put this jar on classpath.

In response to bug 38055

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java?rev=365822r1=365821r2=365822view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
 Tue Jan  3 20:26:40 2006
@@ -84,38 +84,60 @@
 }
 catch (ClassNotFoundException e)
 {
-String ukey = null;
-if (null != key)
+try 
 {
-ukey = key.toUpperCase();
-}
-if (ukey.indexOf(FTPClientConfig.SYST_UNIX) = 0)
-{
-parser = createUnixFTPEntryParser();
-}
-else if (ukey.indexOf(FTPClientConfig.SYST_VMS) = 0)
-{
-parser = createVMSVersioningFTPEntryParser();
-}
-else if (ukey.indexOf(FTPClientConfig.SYST_NT) = 0)
-{
-parser = createNTFTPEntryParser();
-}
-else if (ukey.indexOf(FTPClientConfig.SYST_OS2) = 0)
-{
-parser = createOS2FTPEntryParser();
-}
-else if (ukey.indexOf(FTPClientConfig.SYST_OS400) = 0)
-{
-parser = createOS400FTPEntryParser();
-}
-else if (ukey.indexOf(FTPClientConfig.SYST_MVS) = 0)
-{
-parser = createMVSEntryParser();
-   }
-else
-{
-throw new ParserInitializationException(Unknown parser type: 
 + key);
+   String ukey = null;
+   if (null != key)
+   {
+   ukey = key.toUpperCase();
+   }
+   if (ukey.indexOf(FTPClientConfig.SYST_UNIX) = 0)
+   {
+   parser = createUnixFTPEntryParser();
+   }
+   else if (ukey.indexOf(FTPClientConfig.SYST_VMS) = 0)
+   {
+   parser = createVMSVersioningFTPEntryParser();
+   }
+   else if (ukey.indexOf(FTPClientConfig.SYST_NT) = 0)
+   {
+   parser = createNTFTPEntryParser();
+   }
+   else if (ukey.indexOf(FTPClientConfig.SYST_OS2) = 0)
+   {
+   parser = createOS2FTPEntryParser();
+   }
+   else if (ukey.indexOf(FTPClientConfig.SYST_OS400) = 0)
+   {
+   parser = createOS400FTPEntryParser();
+   }
+   else if (ukey.indexOf(FTPClientConfig.SYST_MVS) = 0)
+   {
+   parser = createMVSEntryParser();
+   }
+   else
+   {
+   throw new ParserInitializationException(Unknown parser 
type:  + key);
+   }
+} 
+catch (NoClassDefFoundError nf)
+{  
+if (nf.getMessage().startsWith(org/apache/oro)) {
+   throw new ParserInitializationException(
+jakarta-oro-2.x.jar required on the runtime 
classpath. , nf);
+} else {
+throw new ParserInitializationException(Error 
initializing parser, nf);
+}
+}
+
+}
+catch (NoClassDefFoundError e)
+{  
+if (e.getMessage().startsWith(org/apache/oro)) {
+   throw new ParserInitializationException(
+jakarta-oro-2.x.jar required on the runtime 
classpath. , e);
+} else {
+throw new ParserInitializationException(Error initializing 
parser, e);
 }
 }
 catch (ClassCastException e)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r354056 - in /jakarta/commons/proper/commons-build/trunk: project.properties xdocs/releases/prepare.xml xdocs/releases/release.xml

2005-12-05 Thread scohen
Author: scohen
Date: Mon Dec  5 04:21:55 2005
New Revision: 354056

URL: http://svn.apache.org/viewcvs?rev=354056view=rev
Log:
remove stale info about STATUS.html from release.xml.  Move stuff from there to 
prepare.xml where it belongs.  Update project.properties with correct 
maven.xdoc.jsl value


Modified:
jakarta/commons/proper/commons-build/trunk/project.properties
jakarta/commons/proper/commons-build/trunk/xdocs/releases/prepare.xml
jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml

Modified: jakarta/commons/proper/commons-build/trunk/project.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/commons-build/trunk/project.properties?rev=354056r1=354055r2=354056view=diff
==
--- jakarta/commons/proper/commons-build/trunk/project.properties (original)
+++ jakarta/commons/proper/commons-build/trunk/project.properties Mon Dec  5 
04:21:55 2005
@@ -45,7 +45,7 @@
 ##
 # commons site LF
 ##
-maven.xdoc.jsl=../commons-build/commons-site.jsl
+maven.xdoc.jsl=commons-site.jsl
 maven.xdoc.date=left
 maven.xdoc.poweredby.image=maven-feather.png
 maven.xdoc.developmentProcessUrl=http://jakarta.apache.org/commons/charter.html

Modified: jakarta/commons/proper/commons-build/trunk/xdocs/releases/prepare.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/commons-build/trunk/xdocs/releases/prepare.xml?rev=354056r1=354055r2=354056view=diff
==
--- jakarta/commons/proper/commons-build/trunk/xdocs/releases/prepare.xml 
(original)
+++ jakarta/commons/proper/commons-build/trunk/xdocs/releases/prepare.xml Mon 
Dec  5 04:21:55 2005
@@ -596,6 +596,18 @@
 /ul
 /subsection
 
+subsection name=project.xml (aka POM)
+p
+   project.xml, used by Maven to generate that site, has some data which 
may have become stale.
+   Make sure it isn't before releasing.  Look at the dependencies report, 
todo report,
+   and other reports.
+/p
+ul
+liEnsure dependencies are correct/li
+liEnsure completed tasks are removed from todo list/li
+/ul
+/subsection
+
 subsection name=Code Style
 p
 Many projects enforce coding styles using the CheckStyle or PMD tools. If 
your

Modified: jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml?rev=354056r1=354055r2=354056view=diff
==
--- jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml 
(original)
+++ jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml Mon 
Dec  5 04:21:55 2005
@@ -557,15 +557,6 @@
 /p
 ul
 li
-strongUpdate STATUS.html/strong
-Check and update STATUS.html:
-ul
-liUpdate release info section/li
-liEnsure dependencies are correct/li
-liEnsure completed tasks are removed from todo list/li
-/ul
-/li
-li
 strongUpdate Build Version Number/strong
 Update build number found in codebuild.xml/code in the trunk. This 
should be 
 updated to a codedev/code release, eg change 1.2 to 1.3-dev



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HELP! - WAS: Re: [vote][net] Release commons-net 1.4.1?

2005-12-05 Thread scohen
Dennis Lundberg wrote:

If commons component A extends the project.xml file from commons-build 
these dependencies are transfered to that component, meaning that 
component A doesn't have to worry about dependencies for site generation.

However, if commons component B does *not* extend the project.xml file 
from commons-build these dependencies will have to be repeated in the 
project.xml file for component B. Hopefully these dependencies would not 
change all that often, meaning that little work would have to be done in 
order to keep this working, once it has been set up properly.

Either way I think there is a big win including these dependencies in 
commons-build and all commons components. What do you think?

This sounds great.  Would have made my tasks this weekend much easier.

However, I'm a bit behind the maven curve here.  Could you please
explain what the extends mechanism is for POMs?  How would I tell if
the project I'm working on extends commons-build or not?

Thanks,
Steve


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r353903 - /jakarta/commons/proper/net/trunk/xdocs/changes.xml

2005-12-04 Thread scohen
Author: scohen
Date: Sun Dec  4 12:34:32 2005
New Revision: 353903

URL: http://svn.apache.org/viewcvs?rev=353903view=rev
Log:
add the changes for 1.4.1 to the main trunk.

Modified:
jakarta/commons/proper/net/trunk/xdocs/changes.xml

Modified: jakarta/commons/proper/net/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/xdocs/changes.xml?rev=353903r1=353902r2=353903view=diff
==
--- jakarta/commons/proper/net/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/net/trunk/xdocs/changes.xml Sun Dec  4 12:34:32 2005
@@ -29,6 +29,16 @@
be sent.
/action
/release
+   
+   release version=1.4.1 date=December 3, 2005 
description=fix release to restore jdk 1.3 compatability
+   action dev=scohen type=fix
+   Applied patches for defect 37113. Code 
incompatible with jdk 1.3. Original patch submitted by lt;Andrea Rombaldgt;
+   /action
+   action dev=scohen type=fix
+   Applied patches for defect 37522. updated 
project.xml to correct compatibility level.
+   /action
+   /release
+   
release version=1.4.0 date=May 7, 2005 description=Some 
additions and enhancements
action dev=dfs type=fix
Fixed typo in method name.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r353905 - /jakarta/commons/proper/net/trunk/build.xml

2005-12-04 Thread scohen
Author: scohen
Date: Sun Dec  4 12:40:46 2005
New Revision: 353905

URL: http://svn.apache.org/viewcvs?rev=353905view=rev
Log:
correct version number

Modified:
jakarta/commons/proper/net/trunk/build.xml

Modified: jakarta/commons/proper/net/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/build.xml?rev=353905r1=353904r2=353905view=diff
==
--- jakarta/commons/proper/net/trunk/build.xml (original)
+++ jakarta/commons/proper/net/trunk/build.xml Sun Dec  4 12:40:46 2005
@@ -20,7 +20,7 @@
   /property
   property name=javadocdir value=dist/docs/api
   /property
-  property name=final.name value=commons-net-1.3.0-dev
+  property name=final.name value=commons-net-1.5.0-dev
   /property
   path id=build.classpath
 fileset dir=${libdir}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r353980 - /jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/navigation.xml

2005-12-04 Thread scohen
Author: scohen
Date: Sun Dec  4 20:17:06 2005
New Revision: 353980

URL: http://svn.apache.org/viewcvs?rev=353980view=rev
Log:
add Javadoc to main navigation menu.

Modified:
jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/navigation.xml

Modified: jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/navigation.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/navigation.xml?rev=353980r1=353979r2=353980view=diff
==
--- jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/navigation.xml 
(original)
+++ jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/navigation.xml Sun Dec  
4 20:17:06 2005
@@ -24,6 +24,7 @@
   item name=Migration How-to  href=/migration.html/
   item name=FAQ   href=/faq.html/
   item name=Download  href=/download.html/
+  item name=Javadoc   href=apidocs/index.html/
   item name=Release Notes href=/changes-report.html/
 /menu
 menu name=Development



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r353983 - /jakarta/commons/proper/net/trunk/xdocs/navigation.xml

2005-12-04 Thread scohen
Author: scohen
Date: Sun Dec  4 20:18:27 2005
New Revision: 353983

URL: http://svn.apache.org/viewcvs?rev=353983view=rev
Log:
add Javadoc to main navigation menu.

Modified:
jakarta/commons/proper/net/trunk/xdocs/navigation.xml

Modified: jakarta/commons/proper/net/trunk/xdocs/navigation.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/xdocs/navigation.xml?rev=353983r1=353982r2=353983view=diff
==
--- jakarta/commons/proper/net/trunk/xdocs/navigation.xml (original)
+++ jakarta/commons/proper/net/trunk/xdocs/navigation.xml Sun Dec  4 20:18:27 
2005
@@ -24,6 +24,7 @@
   item name=Migration How-to  href=/migration.html/
   item name=FAQ   href=/faq.html/
   item name=Download  href=/download.html/
+  item name=Javadoc   href=apidocs/index.html/
   item name=Release Notes href=/changes-report.html/
 /menu
 menu name=Development



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351936 - /jakarta/commons/proper/net/branches/NET_1_4_1/

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 05:06:11 2005
New Revision: 351936

URL: http://svn.apache.org/viewcvs?rev=351936view=rev
Log:
cut branch for NET_1_4_1 from tag of NET_1_4_0 to fix jdk incompatibility 
problems.

Added:
jakarta/commons/proper/net/branches/NET_1_4_1/
  - copied from r351935, jakarta/commons/proper/net/tags/NET_1_4_0/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351942 - in /jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net: ftp/FTPClientConfig.java nntp/Article.java

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 05:34:01 2005
New Revision: 351942

URL: http://svn.apache.org/viewcvs?rev=351942view=rev
Log:
Apply patch from Andrea Rombald to restore JDK 1.3 compatibility.

Modified:

jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/ftp/FTPClientConfig.java

jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/nntp/Article.java

Modified: 
jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/ftp/FTPClientConfig.java?rev=351942r1=351941r2=351942view=diff
==
--- 
jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 (original)
+++ 
jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 Sat Dec  3 05:34:01 2005
@@ -245,17 +245,17 @@
LANGUAGE_CODE_MAP.put(en, Locale.ENGLISH);
LANGUAGE_CODE_MAP.put(de,Locale.GERMAN);
LANGUAGE_CODE_MAP.put(it,Locale.ITALIAN);
-   LANGUAGE_CODE_MAP.put(es, new Locale(es)); // spanish
-   LANGUAGE_CODE_MAP.put(pt, new Locale(pt)); // portuguese
-   LANGUAGE_CODE_MAP.put(da, new Locale(da)); // danish
-   LANGUAGE_CODE_MAP.put(sv, new Locale(sv)); // swedish
-   LANGUAGE_CODE_MAP.put(no, new Locale(no)); // norwegian
-   LANGUAGE_CODE_MAP.put(nl, new Locale(nl)); // dutch
-   LANGUAGE_CODE_MAP.put(ro, new Locale(ro)); // romanian
-   LANGUAGE_CODE_MAP.put(sq, new Locale(sq)); // albanian
-   LANGUAGE_CODE_MAP.put(sh, new Locale(sh)); // serbo-croatian
-   LANGUAGE_CODE_MAP.put(sk, new Locale(sk)); // slovak

-   LANGUAGE_CODE_MAP.put(sl, new Locale(sl)); // slovenian
+   LANGUAGE_CODE_MAP.put(es, new Locale(es, , )); // 
spanish
+   LANGUAGE_CODE_MAP.put(pt, new Locale(pt, , )); // 
portuguese
+   LANGUAGE_CODE_MAP.put(da, new Locale(da, , )); // danish
+   LANGUAGE_CODE_MAP.put(sv, new Locale(sv, , )); // 
swedish
+   LANGUAGE_CODE_MAP.put(no, new Locale(no, , )); // 
norwegian
+   LANGUAGE_CODE_MAP.put(nl, new Locale(nl, , )); // dutch
+   LANGUAGE_CODE_MAP.put(ro, new Locale(ro, , )); // 
romanian
+   LANGUAGE_CODE_MAP.put(sq, new Locale(sq, , )); // 
albanian
+   LANGUAGE_CODE_MAP.put(sh, new Locale(sh, , )); // 
serbo-croatian
+   LANGUAGE_CODE_MAP.put(sk, new Locale(sk, , )); // 
slovak
+   LANGUAGE_CODE_MAP.put(sl, new Locale(sl, , )); // 
slovenian
 
 
// some don't

Modified: 
jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/nntp/Article.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/nntp/Article.java?rev=351942r1=351941r2=351942view=diff
==
--- 
jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/nntp/Article.java
 (original)
+++ 
jakarta/commons/proper/net/branches/NET_1_4_1/src/java/org/apache/commons/net/nntp/Article.java
 Sat Dec  3 05:34:01 2005
@@ -113,7 +113,7 @@
if (references == null)
return new String[0];
ArrayList list = new ArrayList();
-   int terminator = references.indexOf(:);
+   int terminator = references.toString().indexOf(':');
StringTokenizer st =
new StringTokenizer(references.substring(terminator), 
\t);
while (st.hasMoreTokens()) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351944 - /jakarta/commons/proper/net/branches/NET_1_4_1/project.properties

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 05:43:06 2005
New Revision: 351944

URL: http://svn.apache.org/viewcvs?rev=351944view=rev
Log:
change maven.compile.target to 1.2 from 1.4

Modified:
jakarta/commons/proper/net/branches/NET_1_4_1/project.properties

Modified: jakarta/commons/proper/net/branches/NET_1_4_1/project.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/project.properties?rev=351944r1=351943r2=351944view=diff
==
--- jakarta/commons/proper/net/branches/NET_1_4_1/project.properties (original)
+++ jakarta/commons/proper/net/branches/NET_1_4_1/project.properties Sat Dec  3 
05:43:06 2005
@@ -18,7 +18,7 @@
 maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
 
 maven.jar.excludes=**/examples/**
-maven.compile.target=1.4
+maven.compile.target=1.2
 
 # commons site LF
 maven.xdoc.jsl=../commons-build/commons-site.jsl



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351950 - /jakarta/commons/proper/net/branches/NET_1_4_1/project.xml

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 06:07:00 2005
New Revision: 351950

URL: http://svn.apache.org/viewcvs?rev=351950view=rev
Log:
update for version 1.4.1

Modified:
jakarta/commons/proper/net/branches/NET_1_4_1/project.xml

Modified: jakarta/commons/proper/net/branches/NET_1_4_1/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/project.xml?rev=351950r1=351949r2=351950view=diff
==
--- jakarta/commons/proper/net/branches/NET_1_4_1/project.xml (original)
+++ jakarta/commons/proper/net/branches/NET_1_4_1/project.xml Sat Dec  3 
06:07:00 2005
@@ -19,7 +19,7 @@
 
nameJakarta Commons Net/name
idcommons-net/id
-   currentVersion1.4.0-dev/currentVersion
+   currentVersion1.4.1/currentVersion
inceptionYear1997/inceptionYear
shortDescriptionJakarta Commons Net/shortDescription
description/
@@ -99,6 +99,16 @@
id1.3.0/id
name1.3.0/name
tagNET_1_3_0/tag
+   /version
+   version
+   id1.4.0/id
+   name1.4.0/name
+   tagNET_1_4_0/tag
+   /version
+   version
+   id1.4.1/id
+   name1.4.1/name
+   tagNET_1_4_1/tag
/version
/versions
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351951 - /jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 06:20:49 2005
New Revision: 351951

URL: http://svn.apache.org/viewcvs?rev=351951view=rev
Log:
update for version 1.4.1

Modified:
jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml

Modified: jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml?rev=351951r1=351950r2=351951view=diff
==
--- jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml (original)
+++ jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml Sat Dec  3 
06:20:49 2005
@@ -22,6 +22,11 @@

 
body
+   release version=1.4.1 date=December 3, 2005 
description=fix release to restore jdk 1.3 compatability
+   action dev=scohen type=fix
+   Applied fix to fix incompatibilites. Original 
patch submitted by lt;Andrea Rombaldgt;
+   /action
+   /release
release version=1.4.0 date=February 9, 2005 
description=fixes
action dev=dfs type=fix
Fixed typo in method name.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351961 - /jakarta/commons/proper/net/branches/NET_1_4_1/build.xml

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 07:43:40 2005
New Revision: 351961

URL: http://svn.apache.org/viewcvs?rev=351961view=rev
Log:
update for version 1.4.1

Modified:
jakarta/commons/proper/net/branches/NET_1_4_1/build.xml

Modified: jakarta/commons/proper/net/branches/NET_1_4_1/build.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/build.xml?rev=351961r1=351960r2=351961view=diff
==
--- jakarta/commons/proper/net/branches/NET_1_4_1/build.xml (original)
+++ jakarta/commons/proper/net/branches/NET_1_4_1/build.xml Sat Dec  3 07:43:40 
2005
@@ -1,7 +1,5 @@
 ?xml version=1.0 encoding=UTF-8?
 
-!--build.xml generated by maven from project.xml version 1.3.0-dev
-  on date September 8 2004, time 2216--
 
 project default=jar name=commons-net basedir=.
   property name=defaulttargetdir value=target
@@ -20,7 +18,7 @@
   /property
   property name=javadocdir value=dist/docs/api
   /property
-  property name=final.name value=commons-net-1.3.0-dev
+  property name=final.name value=commons-net-1.4.1
   /property
   path id=build.classpath
 fileset dir=${libdir}
@@ -147,7 +145,7 @@
 /tstamp
 property name=copyright value=Copyright amp;copy;  The Apache 
Software Foundation. All Rights Reserved.
 /property
-property name=title value=Jakarta Commons Net 1.3.0-dev API
+property name=title value=Jakarta Commons Net 1.4.1 API
 /property
 javadoc use=true private=false destdir=${javadocdir} author=true 
version=true sourcepath=src/java packagenames=org.apache.commons.net.*
   classpath



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351968 - /jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 08:03:42 2005
New Revision: 351968

URL: http://svn.apache.org/viewcvs?rev=351968view=rev
Log:
update changes log

Modified:
jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml

Modified: jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml?rev=351968r1=351967r2=351968view=diff
==
--- jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml (original)
+++ jakarta/commons/proper/net/branches/NET_1_4_1/xdocs/changes.xml Sat Dec  3 
08:03:42 2005
@@ -24,7 +24,10 @@
body
release version=1.4.1 date=December 3, 2005 
description=fix release to restore jdk 1.3 compatability
action dev=scohen type=fix
-   Applied fix to fix incompatibilites. Original 
patch submitted by lt;Andrea Rombaldgt;
+   Applied patches for defect 37113. Code 
incompatible with jdk 1.3. Original patch submitted by lt;Andrea Rombaldgt;
+   /action
+   action dev=scohen type=fix
+   Applied patches for defect 37522. updated 
project.xml to correct compatibility level.
/action
/release
release version=1.4.0 date=February 9, 2005 
description=fixes



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r352026 - /jakarta/commons/proper/net/branches/NET_1_4_1/project.xml

2005-12-03 Thread scohen
Author: scohen
Date: Sat Dec  3 13:40:38 2005
New Revision: 352026

URL: http://svn.apache.org/viewcvs?rev=352026view=rev
Log:
remove statcvs plugin which doesn't work.

Modified:
jakarta/commons/proper/net/branches/NET_1_4_1/project.xml

Modified: jakarta/commons/proper/net/branches/NET_1_4_1/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/branches/NET_1_4_1/project.xml?rev=352026r1=352025r2=352026view=diff
==
--- jakarta/commons/proper/net/branches/NET_1_4_1/project.xml (original)
+++ jakarta/commons/proper/net/branches/NET_1_4_1/project.xml Sat Dec  3 
13:40:38 2005
@@ -211,7 +211,6 @@
reports
reportmaven-changes-plugin/report
reportmaven-tasklist-plugin/report
-   reportmaven-statcvs-plugin/report
reportmaven-junit-report-plugin/report
reportmaven-jdepend-plugin/report
reportmaven-jcoverage-plugin/report



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r344868 - /jakarta/commons/proper/net/trunk/project.properties

2005-11-15 Thread scohen
Author: scohen
Date: Tue Nov 15 19:50:53 2005
New Revision: 344868

URL: http://svn.apache.org/viewcvs?rev=344868view=rev
Log:
fix bug 37522

Modified:
jakarta/commons/proper/net/trunk/project.properties

Modified: jakarta/commons/proper/net/trunk/project.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/project.properties?rev=344868r1=344867r2=344868view=diff
==
--- jakarta/commons/proper/net/trunk/project.properties (original)
+++ jakarta/commons/proper/net/trunk/project.properties Tue Nov 15 19:50:53 2005
@@ -18,7 +18,7 @@
 maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
 
 maven.jar.excludes=**/examples/**
-maven.compile.target=1.4
+maven.compile.target=1.2
 
 # commons site LF
 maven.xdoc.jsl=../commons-build/commons-site.jsl



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r326314 - in /jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net: ftp/FTPClientConfig.java nntp/Article.java

2005-10-18 Thread scohen
Author: scohen
Date: Tue Oct 18 18:23:33 2005
New Revision: 326314

URL: http://svn.apache.org/viewcvs?rev=326314view=rev
Log:
Apply patch from Andrea Rombald to restore JDK 1.3 compatibility.

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/nntp/Article.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java?rev=326314r1=326313r2=326314view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 Tue Oct 18 18:23:33 2005
@@ -246,17 +246,17 @@
LANGUAGE_CODE_MAP.put(en, Locale.ENGLISH);
LANGUAGE_CODE_MAP.put(de,Locale.GERMAN);
LANGUAGE_CODE_MAP.put(it,Locale.ITALIAN);
-   LANGUAGE_CODE_MAP.put(es, new Locale(es)); // spanish
-   LANGUAGE_CODE_MAP.put(pt, new Locale(pt)); // portuguese
-   LANGUAGE_CODE_MAP.put(da, new Locale(da)); // danish
-   LANGUAGE_CODE_MAP.put(sv, new Locale(sv)); // swedish
-   LANGUAGE_CODE_MAP.put(no, new Locale(no)); // norwegian
-   LANGUAGE_CODE_MAP.put(nl, new Locale(nl)); // dutch
-   LANGUAGE_CODE_MAP.put(ro, new Locale(ro)); // romanian
-   LANGUAGE_CODE_MAP.put(sq, new Locale(sq)); // albanian
-   LANGUAGE_CODE_MAP.put(sh, new Locale(sh)); // serbo-croatian
-   LANGUAGE_CODE_MAP.put(sk, new Locale(sk)); // slovak

-   LANGUAGE_CODE_MAP.put(sl, new Locale(sl)); // slovenian
+   LANGUAGE_CODE_MAP.put(es, new Locale(es, , )); // 
spanish
+   LANGUAGE_CODE_MAP.put(pt, new Locale(pt, , )); // 
portuguese
+   LANGUAGE_CODE_MAP.put(da, new Locale(da, , )); // danish
+   LANGUAGE_CODE_MAP.put(sv, new Locale(sv, , )); // 
swedish
+   LANGUAGE_CODE_MAP.put(no, new Locale(no, , )); // 
norwegian
+   LANGUAGE_CODE_MAP.put(nl, new Locale(nl, , )); // dutch
+   LANGUAGE_CODE_MAP.put(ro, new Locale(ro, , )); // 
romanian
+   LANGUAGE_CODE_MAP.put(sq, new Locale(sq, , )); // 
albanian
+   LANGUAGE_CODE_MAP.put(sh, new Locale(sh, , )); // 
serbo-croatian
+   LANGUAGE_CODE_MAP.put(sk, new Locale(sk, , )); // 
slovak
+   LANGUAGE_CODE_MAP.put(sl, new Locale(sl, , )); // 
slovenian
 
 
// some don't

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/nntp/Article.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/nntp/Article.java?rev=326314r1=326313r2=326314view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/nntp/Article.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/nntp/Article.java
 Tue Oct 18 18:23:33 2005
@@ -113,7 +113,7 @@
if (references == null)
return new String[0];
ArrayList list = new ArrayList();
-   int terminator = references.indexOf(:);
+   int terminator = references.toString().indexOf(':');
StringTokenizer st =
new StringTokenizer(references.substring(terminator), 
\t);
while (st.hasMoreTokens()) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r190706 - in /jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java

2005-06-14 Thread scohen
Author: scohen
Date: Tue Jun 14 21:17:03 2005
New Revision: 190706

URL: http://svn.apache.org/viewcvs?rev=190706view=rev
Log:
Fix defect 35346.  Patch submitted by Sergey Smimov

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java?rev=190706r1=190705r2=190706view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
 Tue Jun 14 21:17:03 2005
@@ -39,8 +39,7 @@
  */
 private static final String REGEX =
 (\\S+)\\s+(\\S+)\\s+
-+ (DIR)?\\s*
-+ ([0-9]+)?\\s+
++ (?:(DIR)|([0-9]+))\\s+
 + (\\S.*);
 
 /**

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java?rev=190706r1=190705r2=190706view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
 Tue Jun 14 21:17:03 2005
@@ -199,4 +199,14 @@
 FTPFile f = getParser().parseFTPEntry(directoryBeginningWithNumber);
 assertEquals(name, 123xyz, f.getName());
 }
+
+public void testDirectoryBeginningWithNumberFollowedBySpaces() throws 
Exception
+{
+FTPFile f = getParser().parseFTPEntry(12-03-96  06:38AM   DIR   
   123 xyz);
+assertEquals(name, 123 xyz, f.getName());
+f = getParser().parseFTPEntry(12-03-96  06:38AM   DIR  
123 abc xyz);
+assertNotNull(f);
+assertEquals(name, 123 abc xyz, f.getName());
+}
+
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r185093 - in /jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/FTPClientConfig.java java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

2005-06-06 Thread scohen
Author: scohen
Date: Mon Jun  6 16:15:51 2005
New Revision: 185093

URL: http://svn.apache.org/viewcvs?rev=185093view=rev
Log:
Fix bug 35181 - add an option to specify leniency when needed because
client and server systems cannot be synchronized.

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java?rev=185093r1=185092r2=185093view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 Mon Jun  6 16:15:51 2005
@@ -179,6 +179,7 @@
 private final String serverSystemKey;
private String defaultDateFormatStr = null;
private String recentDateFormatStr = null;
+   private boolean lenientFutureDates = false;
private String serverLanguageCode = null;
private String shortMonthNames = null;
private String serverTimeZoneId = null;
@@ -324,6 +325,15 @@
return serverLanguageCode;
}

+/**
+* p
+* getter for the [EMAIL PROTECTED]  #setLenientFutureDates(boolean)  
lenientFutureDates} property.
+* /p  
+ * @return Returns the lenientFutureDates.
+ */
+public boolean isLenientFutureDates() {
+return lenientFutureDates;
+}
/**
 * p
 * setter for the defaultDateFormatStr property.  This property
@@ -361,6 +371,29 @@
this.recentDateFormatStr = recentDateFormatStr;
}

+   /**
+* p
+* setter for the lenientFutureDates property.  This boolean property
+* (default: false) only has meaning when a 
+* [EMAIL PROTECTED]  #setRecentDateFormatStr(String)  
recentDateFormatStr} property
+* has been set.  In that case, if this property is set true, then the
+* parser, when it encounters a listing parseable with the recent date 
+* format, will only consider a date to belong to the previous year if
+* it is more than one day in the future.  This will allow all 
+* out-of-synch situations (whether based on slop - i.e. servers 
simply 
+* out of synch with one another or because of time zone differences - 
+* but in the latter case it is highly recommended to use the 
+* [EMAIL PROTECTED]  #setServerTimeZoneId(String)  serverTimeZoneId} 
property
+* instead) to resolve correctly.
+* /pp
+* This is used primarily in unix-based systems.
+* /p
+* @param lenientFutureDates set true to compensate for out-of-synch 
+* conditions.
+*/
+public void setLenientFutureDates(boolean lenientFutureDates) {
+this.lenientFutureDates = lenientFutureDates;
+}
/**
 * p
 * setter for the serverTimeZoneId property.  This property

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java?rev=185093r1=185092r2=185093view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
 Mon Jun  6 16:15:51 2005
@@ -41,6 +41,7 @@

private SimpleDateFormat defaultDateFormat;
private SimpleDateFormat recentDateFormat;
+   private boolean lenientFutureDates = false;


/**
@@ -82,6 +83,12 @@
{
working.setTime(parsed);
working.set(Calendar.YEAR, now.get(Calendar.YEAR));
+   
+   if (this.lenientFutureDates) {
+   // add a day to now so that slop doesn't cause 
a date 
+   // slightly in the future to roll back a full year. 
 (Bug 35181)
+   now.add(Calendar.DATE, 1);
+   }
if (working.after(now)) {
working.add(Calendar.YEAR, -1);
}
@@ -233,5 +240,19 @@
this.defaultDateFormat.setLenient(false

svn commit: r185094 - /jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java

2005-06-06 Thread scohen
Author: scohen
Date: Mon Jun  6 16:17:06 2005
New Revision: 185094

URL: http://svn.apache.org/viewcvs?rev=185094view=rev
Log:
Readjust to account for changes in the organization of the wacom.com 
ftp site referenced in the test. 

Modified:

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java?rev=185094r1=185093r2=185094view=diff
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java
 Mon Jun  6 16:17:06 2005
@@ -49,7 +49,7 @@
 },
 {
 ftp.wacom.com, windows, VMS, HA!,
-wacom97.zip, pub\\ftp\\drivers
+wacom97.zip, pub\\drivers
 },
 {
 h71000.www7.hp.com, vms, windows,



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [VOTE] Stefan Bodewig as commons proper committer

2005-05-13 Thread scohen
I have the highest respect for Stefan.  I vote +1 without even knowing
the reason why it comes up.  He will be a great asset.


  Original Message 
 Subject: [VOTE] Stefan Bodewig as commons proper committer
 From: Martin van den Bemt [EMAIL PROTECTED]
 Date: Fri, May 13, 2005 5:53 am
 To: Jakarta Commons Developers List commons-dev@jakarta.apache.org
 
 Hi everyone,
 
 Had this vote in mind for a long time, but got districted with other 
 parts of my life.
 I call on making Stefan a commons committer (this vote is way overdue, 
 probably due to that everyone probably thinks he is a already committer)
 
 I'll skip the reasons why, since if you are allowed to vote on this I 
 assume you know the outstanding job he is doing.
 
 [ ] +1 Let him commit
 [ ] 0
 [ ] -1 Maybe not, because..
 
 I of course am a big +1 ;)
 
 Mvgr,
 Martin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r161677 - jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

2005-04-17 Thread scohen
Author: scohen
Date: Sun Apr 17 11:41:12 2005
New Revision: 161677

URL: http://svn.apache.org/viewcvs?view=revrev=161677
Log:
Add more tests for the UnixFileEntryParser.  Some things, such as symbolic 
links were not routinely tested.  Now
they are.


Modified:

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java?view=diffr1=161676r2=161677
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 Sun Apr 17 11:41:12 2005
@@ -125,6 +125,7 @@
 FTPFile f2 = parser.parseFTPEntry(testNumericDF2);
 assertNotNull(Failed to parse  + testNumericDF2,
   f2);
+assertEquals(symbolic link, ./../../global/macros/., f2.getLink());
 
 }
 
@@ -235,4 +236,54 @@
public static TestSuite suite() {
return (new TestSuite(UnixFTPEntryParserTest.class));
}
+   
+   
+/* 
+ * @param test
+ * @param f
+ */
+protected void doAdditionalGoodTests(String test, FTPFile f) {
+String link = f.getLink();
+if (null != link) {
+int linklen = link.length();
+if (linklen  0) {
+assertEquals(link, test.substring(test.length() - linklen));
+assertEquals(f.getType(), FTPFile.SYMBOLIC_LINK_TYPE);
+}
+}
+int type = f.getType();
+switch (test.charAt(0))
+{
+case 'd':
+assertEquals(Type of + test, type, FTPFile.DIRECTORY_TYPE);
+break;
+case 'l':
+ assertEquals(Type of + test, type, FTPFile.SYMBOLIC_LINK_TYPE);
+ break;
+case 'b':
+case 'c':
+assertEquals(0, f.getHardLinkCount());
+case 'f':
+case '-':
+assertEquals(Type of + test, type, FTPFile.FILE_TYPE);
+break;
+default:
+assertEquals(Type of + test, type, FTPFile.UNKNOWN_TYPE);
+}
+
+for (int access = FTPFile.USER_ACCESS; 
+   access = FTPFile.WORLD_ACCESS; access++) 
+{
+for (int perm = FTPFile.READ_PERMISSION; 
+   perm = FTPFile.EXECUTE_PERMISSION; perm++)
+{
+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)); 
+}
+}
+
+}
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r161712 - jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

2005-04-17 Thread scohen
Author: scohen
Date: Sun Apr 17 19:57:04 2005
New Revision: 161712

URL: http://svn.apache.org/viewcvs?view=revrev=161712
Log:
make UnixFTPEntryParser.NUMERIC_DATE_FORMAT public and add a comment.

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?view=diffr1=161711r2=161712
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 Sun Apr 17 19:57:04 2005
@@ -47,7 +47,19 @@
 static final String NUMERIC_DATE_FORMAT 
= -MM-dd HH:mm; //2001-11-09 20:06
 
-static final FTPClientConfig NUMERIC_DATE_CONFIG =
+/**
+ * Some Linux distributions are now shipping an FTP server which formats
+ * file listing dates in an all-numeric format: 
+ * code-MM-dd HH:mm/code.  
+ * This is a very welcome development,  and hopefully it will soon become 
+ * the standard.  However, since it is so new, for now, and possibly 
+ * forever, we merely accomodate it, but do not make it the default.
+ * p
+ * For now end users may specify this format only via 
+ * codeUnixFTPEntryParser(FTPClientConfig)/code.
+ * Steve Cohen - 2005-04-17
+ */
+public static final FTPClientConfig NUMERIC_DATE_CONFIG =
 new FTPClientConfig(
 FTPClientConfig.SYST_UNIX,
 NUMERIC_DATE_FORMAT,



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r161564 - in jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

2005-04-16 Thread scohen
Author: scohen
Date: Sat Apr 16 05:44:15 2005
New Revision: 161564

URL: http://svn.apache.org/viewcvs?view=revrev=161564
Log:
Add supporting logic enabling test cases to be created for the Unix numeric 
date formats.

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?view=diffr1=161563r2=161564
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 Sat Apr 16 05:44:15 2005
@@ -44,6 +44,15 @@
 static final String DEFAULT_RECENT_DATE_FORMAT 
= MMM d HH:mm; //Nov 9 20:06
 
+static final String NUMERIC_DATE_FORMAT 
+   = -MM-dd HH:mm; //2001-11-09 20:06
+
+static final FTPClientConfig NUMERIC_DATE_CONFIG =
+new FTPClientConfig(
+FTPClientConfig.SYST_UNIX,
+NUMERIC_DATE_FORMAT,
+null, null, null, null);
+
 /**
  * this is the regular expression used by this parser.
  *
@@ -70,7 +79,7 @@
 + (\\S+)\\s+
 + (?:(\\S+)\\s+)?
 + (\\d+)\\s+
-   + (\\S+)\\s+(\\S+)\\s+((\\S+)(?:\\s+))? /*the three parts of 
the date in any order*/
+   + (\\S+)\\s+(\\S+)\\s+((\\S+)(?:\\s+))? /*the two or three 
parts of the date in any order*/
 + (\\S+)(\\s*.*);
 
 
@@ -259,5 +268,8 @@
 DEFAULT_RECENT_DATE_FORMAT,
 null, null, null);
 }
+
+
+
 
 }

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java?view=diffr1=161563r2=161564
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 Sat Apr 16 05:44:15 2005
@@ -38,10 +38,11 @@
-rw-r--r--   1 14   staff  119:26 Aug 22  2000 
zxJDBC-1.2.3.zip,
-rw-r--r--   1 ftp  no group83853 Jan 22  2001 
zxJDBC-1.2.4.tar.gz,
-rw-r--r--   1ftp   nogroup126552 Jan 22  2001 
zxJDBC-1.2.4.zip,
+   -rw-r--r--   1 root root   190144 2001-04-27 
zxJDBC-2.0.1b1.zip,
-rw-r--r--   1 root root   111325 Apr -7 18:79 
zxJDBC-2.0.1b1.tar.gz };
 
-   private static final String[] goodsamples = {
-
+   private static final String[] goodsamples = 
+   {
-rw-r--r--   1 500  50021 Aug  8 14:14 
JB3-TES1.gz,
-rwxr-xr-x   2 root root 4096 Mar  2 15:13 
zxbox,
drwxr-xr-x   2 root root 4096 Aug 24  2001 
zxjdbc,
@@ -68,8 +69,8 @@
-rwsr-sr--   1 500  500 0 Mar 25 08:23 
testSuidExec,
-rwsr-sr--   1 500  500 0 Mar 25 0:23 
testSuidExec2,
drwxrwx---+ 23 500 5000 Jan 10 13:09 testACL,
-
-   -rw-r--r--   1 13518644 May 25 12:12 std };
+   -rw-r--r--   1 13518644 May 25 12:12 std 
+   };
 
/**
 * @see junit.framework.TestCase#TestCase(String)
@@ -91,6 +92,33 @@
protected String[] getGoodListing() {
return (goodsamples);
}
+   
+/**
+ */
+public void testNumericDateFormat()
+{
+String testNumericDF = 
+   -rw-r-   1 neeme neeme   346 2005-04-08 11:22 
services.vsp;
+
+UnixFTPEntryParser parser = 
+new UnixFTPEntryParser(UnixFTPEntryParser.NUMERIC_DATE_CONFIG);
+
+FTPFile f = parser.parseFTPEntry(testNumericDF);
+assertNotNull(Failed to parse  + testNumericDF,
+  f);
+
+
+   Calendar cal = Calendar.getInstance();
+   cal.clear();
+   cal.set(Calendar.YEAR, 2005);
+   cal.set(Calendar.MONTH, Calendar.APRIL);
+
+   cal.set(Calendar.DATE, 8);
+   cal.set(Calendar.HOUR_OF_DAY, 11);
+   cal.set(Calendar.MINUTE

svn commit: r161565 - in jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

2005-04-16 Thread scohen
Author: scohen
Date: Sat Apr 16 06:04:34 2005
New Revision: 161565

URL: http://svn.apache.org/viewcvs?view=revrev=161565
Log:
Handle the symbolic link case found by Neeme Praks 

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?view=diffr1=161564r2=161565
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 Sat Apr 16 06:04:34 2005
@@ -80,7 +80,7 @@
 + (?:(\\S+)\\s+)?
 + (\\d+)\\s+
+ (\\S+)\\s+(\\S+)\\s+((\\S+)(?:\\s+))? /*the two or three 
parts of the date in any order*/
-+ (\\S+)(\\s*.*);
++ (\\w+)(\\s*.*);
 
 
 /**

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java?view=diffr1=161564r2=161565
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
 Sat Apr 16 06:04:34 2005
@@ -69,7 +69,9 @@
-rwsr-sr--   1 500  500 0 Mar 25 08:23 
testSuidExec,
-rwsr-sr--   1 500  500 0 Mar 25 0:23 
testSuidExec2,
drwxrwx---+ 23 500 5000 Jan 10 13:09 testACL,
-   -rw-r--r--   1 13518644 May 25 12:12 std 
+   -rw-r--r--   1 13518644 May 25 12:12 std,
+lrwxrwxrwx   1 neeme neeme 23 Mar  2 18:06 macros - 
./../../global/macros/.
+
};
 
/**
@@ -99,6 +101,8 @@
 {
 String testNumericDF = 
-rw-r-   1 neeme neeme   346 2005-04-08 11:22 
services.vsp;
+String testNumericDF2 = 
+lrwxrwxrwx   1 neeme neeme23 2005-03-02 18:06 macros - 
./../../global/macros/.;
 
 UnixFTPEntryParser parser = 
 new UnixFTPEntryParser(UnixFTPEntryParser.NUMERIC_DATE_CONFIG);
@@ -117,6 +121,11 @@
cal.set(Calendar.HOUR_OF_DAY, 11);
cal.set(Calendar.MINUTE, 22);
assertEquals(cal.getTime(), f.getTimestamp().getTime());
+
+FTPFile f2 = parser.parseFTPEntry(testNumericDF2);
+assertNotNull(Failed to parse  + testNumericDF2,
+  f2);
+
 }
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r161566 - jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

2005-04-16 Thread scohen
Author: scohen
Date: Sat Apr 16 07:11:33 2005
New Revision: 161566

URL: http://svn.apache.org/viewcvs?view=revrev=161566
Log:
Improve fix to handle the case of numeric date formats and symbolic links.

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?view=diffr1=161565r2=161566
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 Sat Apr 16 07:11:33 2005
@@ -80,7 +80,7 @@
 + (?:(\\S+)\\s+)?
 + (\\d+)\\s+
+ (\\S+)\\s+(\\S+)\\s+((\\S+)(?:\\s+))? /*the two or three 
parts of the date in any order*/
-+ (\\w+)(\\s*.*);
++ ([^-\\s]\\S*)(\\s*.*);
 
 
 /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r161605 - jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

2005-04-16 Thread scohen
Author: scohen
Date: Sat Apr 16 14:02:58 2005
New Revision: 161605

URL: http://svn.apache.org/viewcvs?view=revrev=161605
Log:
A new regex that is sufficiently robust and satisfies the new requirement of 
being able to parse numeric date
foramts in unix FTP systems.


Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?view=diffr1=161604r2=161605
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 Sat Apr 16 14:02:58 2005
@@ -79,8 +79,19 @@
 + (\\S+)\\s+
 + (?:(\\S+)\\s+)?
 + (\\d+)\\s+
-   + (\\S+)\\s+(\\S+)\\s+((\\S+)(?:\\s+))? /*the two or three 
parts of the date in any order*/
-+ ([^-\\s]\\S*)(\\s*.*);
+
+/*
+  numeric or standard format date
+*/
++ ((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S+\\s+\\S+))\\s+
+   
+/* 
+   year (for non-recent standard format) 
+  or time (for numeric or recent standard format  
+   */
+   + ((?:\\d{4})|(?:\\d{1,2}:\\d{2}))\\s+
+
+   + (\\S*)(\\s*.*);
 
 
 /**
@@ -139,9 +150,8 @@
 String grp = group(17);
 String filesize = group(18);
 String datestr = group(19) +   + group(20);
-if(group(22) != null  group(22) != ) datestr +=   +  
group(22);
-String name = group(23);
-String endtoken = group(24);
+String name = group(21);
+String endtoken = group(22);
 
 try
 {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r161608 - jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

2005-04-16 Thread scohen
Author: scohen
Date: Sat Apr 16 14:26:48 2005
New Revision: 161608

URL: http://svn.apache.org/viewcvs?view=revrev=161608
Log:
Tweak design to be more faithful to the previous design conception of leaving 
date validation issues to the 
underlying SimpleDateFormat parsers wherever possible.


Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java?view=diffr1=161607r2=161608
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
 Sat Apr 16 14:26:48 2005
@@ -89,7 +89,7 @@
year (for non-recent standard format) 
   or time (for numeric or recent standard format  
*/
-   + ((?:\\d{4})|(?:\\d{1,2}:\\d{2}))\\s+
+   + (\\d+(?::\\d+)?)\\s+
 
+ (\\S*)(\\s*.*);
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r160582 - in jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/ java/org/apache/commons/net/ftp/parser/ test/org/apache/commons/net/ftp/parser/

2005-04-08 Thread scohen
Author: scohen
Date: Fri Apr  8 11:42:20 2005
New Revision: 160582

URL: http://svn.apache.org/viewcvs?view=revrev=160582
Log:
Handle bug 34360 - add new FTP Entry parser for MVS.  Contributed by William 
Noto and Jeff Nadler.

Added:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java
Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/AllTests.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java?view=diffr1=160581r2=160582
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 Fri Apr  8 11:42:20 2005
@@ -170,6 +170,12 @@
  */
 public static final String SYST_OS400 = OS/400;
 
+/**
+ * Identifier by which an MVS-based ftp server is known throughout
+ * the commons-net ftp system.
+ */
+public static final String SYST_MVS = MVS;
+
 private final String serverSystemKey;
private String defaultDateFormatStr = null;
private String recentDateFormatStr = null;

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java?view=diffr1=160581r2=160582
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
 Fri Apr  8 11:42:20 2005
@@ -66,6 +66,7 @@
  *   li[EMAIL PROTECTED] FTPClientConfig#SYST_OS2 OS/2}/li
  *   li[EMAIL PROTECTED] FTPClientConfig#SYST_OS400 
OS/400}/li
  *   li[EMAIL PROTECTED] FTPClientConfig#SYST_VMS VMS}/li
+ *   li[EMAIL PROTECTED] FTPClientConfig#SYST_MVS MVS}/li
  *   /ul
  * @return the FTPFileEntryParser corresponding to the supplied key.
  * @throws ParserInitializationException thrown if for any reason the 
factory cannot resolve
@@ -108,6 +109,10 @@
 {
 parser = createOS400FTPEntryParser();
 }
+else if (ukey.indexOf(FTPClientConfig.SYST_MVS) = 0)
+{
+parser = createMVSEntryParser();
+   }
 else
 {
 throw new ParserInitializationException(Unknown parser type: 
 + key);
@@ -204,6 +209,10 @@
}
 }
 
+public FTPFileEntryParser createMVSEntryParser()
+{
+return new MVSFTPEntryParser();
+}
 
 


Added: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java?view=autorev=160582
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
 (added)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
 Fri Apr  8 11:42:20 2005
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.net.ftp.parser;
+
+import org.apache.commons.net.ftp.FTPClientConfig;
+import org.apache.commons.net.ftp.FTPFile;
+
+/**
+ * Implementation of FTPFileEntryParser and FTPFileListParser for IBM MVS 
Systems.
+ *
+ * @author a href=[EMAIL PROTECTED]Jeff Nadler/a
+ * @author

svn commit: r160408 - in jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/FTPClientConfig.java test/org/apache/commons/net/ftp/FTPClientConfigTest.java test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

2005-04-07 Thread scohen
Author: scohen
Date: Thu Apr  7 08:14:31 2005
New Revision: 160408

URL: http://svn.apache.org/viewcvs?view=revrev=160408
Log:
Convert non-7bit ascii chars to unicode.

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java?view=diffr1=160407r2=160408
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
 Thu Apr  7 08:14:31 2005
@@ -98,7 +98,7 @@
  *FTPClient f=FTPClient();
  *FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_VMS);
  *conf.setShortMonthNames(
- *
jan|feb|mar|apr|ma#xED;|j#xFA;n|j#xFA;l|#xE1;g#xFA;|sep|okt|n#xF3;v|des);
+ *
jan|feb|mar|apr|ma\u00ED|j\u00FAn|j\u00FAl|\u00e1g\u00FA|sep|okt|n\u00F3v|des);
  *f.configure(conf);
  *f.connect(server);
  *f.login(username, password);
@@ -254,7 +254,7 @@
 
// some don't
LANGUAGE_CODE_MAP.put(fr, 
-   jan|fv|mar|avr|mai|jun|jui|ao|sep|oct|nov|dc);  
//french
+   
jan|f\u00e9v|mar|avr|mai|jun|jui|ao\u00fb|sep|oct|nov|d\u00e9c);  //french

}


Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java?view=diffr1=160407r2=160408
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java
 Thu Apr  7 08:14:31 2005
@@ -113,7 +113,7 @@
 Date d2 = null;
 Date d3 = null;
 try {
-   d1 = sdf1.parse(31 dc 2004);
+   d1 = sdf1.parse(31 d\u00e9c 2004);
 } catch (ParseException px) {
 fail(failed.to.parse.french);
 }

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java?view=diffr1=160407r2=160408
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
 Thu Apr  7 08:14:31 2005
@@ -129,7 +129,7 @@
fail(failed.to.parse.default);
}
try {
-   parser.parseTimestamp(fv 22 2002);
+   parser.parseTimestamp(f\u00e9v 22 2002);
fail(should.have.failed.to.parse.default);
} catch (ParseException e) {
// this is the success case
@@ -141,13 +141,13 @@
config.setServerLanguageCode(fr);
parser.configure(config);
try {
-   parser.parseTimestamp(dc 22 2002);
+   parser.parseTimestamp(d\u00e9c 22 2002);
fail(incorrect.field.order);
} catch (ParseException e) {
// this is the success case
}
try {
-   parser.parseTimestamp(22 dc 2002);
+   parser.parseTimestamp(22 d\u00e9c 2002);
} catch (ParseException e) {
fail(failed.to.parse.french);
}
@@ -159,27 +159,27 @@
// this is the success case
}
try {
-   parser.parseTimestamp(29 fv 2002);
+   parser.parseTimestamp(29 f\u00e9v 2002);
fail(nonexistent.date);
} catch (ParseException e) {
// this is the success case
}
 
try {
-   parser.parseTimestamp(22 ao 30:02);
+   parser.parseTimestamp(22 ao\u00fb 30:02);
fail(bad.hour);
} catch

svn commit: r160442 - jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java

2005-04-07 Thread scohen
Author: scohen
Date: Thu Apr  7 12:33:02 2005
New Revision: 160442

URL: http://svn.apache.org/viewcvs?view=revrev=160442
Log:
remove unneeded import statement

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java?view=diffr1=160441r2=160442
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
 Thu Apr  7 12:33:02 2005
@@ -21,7 +21,6 @@
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
-import java.util.StringTokenizer;
 import java.util.TimeZone;
 
 import org.apache.commons.net.ftp.Configurable;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r160443 - in jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp: FTPClientConfigTest.java parser/FTPTimestampParserImplTest.java

2005-04-07 Thread scohen
Author: scohen
Date: Thu Apr  7 12:33:51 2005
New Revision: 160443

URL: http://svn.apache.org/viewcvs?view=revrev=160443
Log:
refactor tests to work properly in non-English locales per suggestions of N. 
Praks.

Modified:

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java?view=diffr1=160442r2=160443
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java
 Thu Apr  7 12:33:51 2005
@@ -19,6 +19,7 @@
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.Locale;
 
 import junit.framework.TestCase;
 
@@ -152,14 +153,15 @@
 } catch (IllegalArgumentException e){
 // should have failed
 }
-DateFormatSymbols dfs = null;
+DateFormatSymbols dfs2 = null;
 try {
-dfs = FTPClientConfig.getDateFormatSymbols(fakeLang);
+dfs2 = FTPClientConfig.getDateFormatSymbols(fakeLang);
 } catch (Exception e){
 fail(rejected valid short month string);
 }
-SimpleDateFormat sdf1 = new SimpleDateFormat(MMM dd, );
-SimpleDateFormat sdf2 = new SimpleDateFormat(MMM dd, , dfs);
+SimpleDateFormat sdf1 = 
+new SimpleDateFormat(MMM dd, , Locale.ENGLISH);
+SimpleDateFormat sdf2 = new SimpleDateFormat(MMM dd, , dfs2);
 
 Date d1 = null;
 Date d2 = null;

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java?view=diffr1=160442r2=160443
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
 Thu Apr  7 12:33:51 2005
@@ -73,17 +73,6 @@

FTPTimestampParserImpl parser = new FTPTimestampParserImpl();
 
-   SimpleDateFormat sdf = 
-   new 
SimpleDateFormat(parser.getRecentDateFormatString());
-   // assume we're in the US Pacific Time Zone
-   TimeZone tzla = TimeZone.getTimeZone(America/Los_Angeles);
-   sdf.setTimeZone(tzla);
-   
-   // get formatted versions of time in L.A. 
-   String fmtTimePlusOneHour = sdf.format(anHourFromNow);
-   String fmtTimePlusThreeHours = sdf.format(threeHoursFromNow);
-
-   
// assume we are FTPing a server in Chicago, two hours ahead of 
// L. A.
FTPClientConfig config = 
@@ -94,6 +83,17 @@
config.setServerTimeZoneId(America/Chicago);
parser.configure(config);

+   SimpleDateFormat sdf = (SimpleDateFormat)
+   parser.getRecentDateFormat().clone();
+   
+   // assume we're in the US Pacific Time Zone
+   TimeZone tzla = TimeZone.getTimeZone(America/Los_Angeles);
+   sdf.setTimeZone(tzla);
+   
+   // get formatted versions of time in L.A. 
+   String fmtTimePlusOneHour = sdf.format(anHourFromNow);
+   String fmtTimePlusThreeHours = sdf.format(threeHoursFromNow);
+   

try {
Calendar parsed = 
parser.parseTimestamp(fmtTimePlusOneHour);
@@ -103,7 +103,7 @@
(long)TWO_HOURS_OF_MILLISECONDS, 
cal.getTime().getTime() - 
parsed.getTime().getTime());
} catch (ParseException e){
-   fail(Unable to parse);
+   fail(Unable to parse  + fmtTimePlusOneHour);
}

//but if the file's timestamp is THREE hours ahead of now, that 
should 
@@ -116,7 +116,7 @@
assertEquals(rollback.even.with.time.zones, 
1, cal.get(Calendar.YEAR) - 
parsed.get(Calendar.YEAR));
} catch (ParseException e){
-   fail(Unable to parse

svn commit: r153885 - in jakarta/commons/proper/net/trunk/src: java/org/apache/commons/net/ftp/FTPClient.java test/org/apache/commons/net/ftp/ListingFunctionalTest.java

2005-02-14 Thread scohen
Author: scohen
Date: Mon Feb 14 19:42:11 2005
New Revision: 153885

URL: http://svn.apache.org/viewcvs?view=revrev=153885
Log:
Deprecate FTPClient.listFiles(String, String) to avoid confusion over new 
FTPClientConfig methods

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java?view=diffr1=153884r2=153885
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
 Mon Feb 14 19:42:11 2005
@@ -2077,6 +2077,9 @@
  * @see org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
  * @see org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory
  * @see org.apache.commons.net.ftp.FTPFileEntryParser
+ * @deprecated use [EMAIL PROTECTED]  #listFiles()  listFiles()} or 
+ * [EMAIL PROTECTED]  #listFiles(String)  listFiles(String)} instead and 
specify the
+ * parser Key in an [EMAIL PROTECTED]  #FTPClientConfig  FTPClientConfig} 
object instead.
  */
 public FTPFile[] listFiles(String parserKey, String pathname)
 throws IOException
@@ -2132,7 +2135,10 @@
 throws IOException
 {
 String key = null;
-return listFiles(key, pathname);
+FTPListParseEngine engine =
+initiateListParsing(key, pathname);
+return engine.getFiles();
+
 }
 /**
  * Using the default system autodetect mechanism, obtain a

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java?view=diffr1=153884r2=153885
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/ListingFunctionalTest.java
 Mon Feb 14 19:42:11 2005
@@ -27,7 +27,7 @@
 /**
  * A functional test suite for checking that site listings work.
  * @author a href=mailto:[EMAIL PROTECTED]Jeffrey D. Brekke/a
- * @version $Id: ListingFunctionalTest.java,v 1.6 2004/04/21 23:30:33 scohen 
Exp $
+ * @version $Id$
  */
 public class ListingFunctionalTest extends TestCase
 {
@@ -248,7 +248,9 @@
 public void testListFiles()
 throws IOException
 {
-List files = Arrays.asList(client.listFiles(validParserKey, 
validPath));
+FTPClientConfig config = new FTPClientConfig(validParserKey);
+client.configure(config);
+List files = Arrays.asList(client.listFiles(validPath));
 
 assertTrue(files.toString(),
findByName(files, validFilename));
@@ -271,7 +273,10 @@
 public void testListFilesWithIncorrectParser()
 throws IOException
 {
-FTPFile[] files = client.listFiles(invalidParserKey, validPath);
+FTPClientConfig config = new FTPClientConfig(invalidParserKey);
+client.configure(config);
+
+FTPFile[] files = client.listFiles(validPath);
 
 assertEquals(0, files.length);
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r151488 - jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java

2005-02-05 Thread scohen
Author: scohen
Date: Sat Feb  5 04:48:48 2005
New Revision: 151488

URL: http://svn.apache.org/viewcvs?view=revrev=151488
Log:
correct initiateListParsing() so that it works in all cases.

Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java?view=diffr1=151487r2=151488
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
 Sat Feb  5 04:48:48 2005
@@ -2330,9 +2330,15 @@
 // We cache the value to avoid creation of a new object every
 // time a file listing is generated.
 if(__entryParser == null) {
-// if a null parserKey is supplied, check the
-   // configuration to see if one was specified there.
-if (null == parserKey) {
+if (null != parserKey) {
+// if a parser key was supplied in the parameters, 
+// use that to create the paraser
+   __entryParser = 
+   __parserFactory.createFileEntryParser(parserKey);
+
+} else {
+   // if no parserKey was supplied, check for a configuration
+   // in the params, and if non-null, use that.
if (null != __configuration) {
__entryParser = 
__parserFactory.createFileEntryParser(__configuration);
@@ -2340,11 +2346,9 @@
 // if a parserKey hasn't been supplied, and a configuration
// hasn't been supplied, then autodetect by calling
 // the SYST command and use that to choose the parser.
-parserKey = getSystemName();
-   
-   }
-} else {
-   __entryParser =  
__parserFactory.createFileEntryParser(parserKey);
+   __entryParser = 
+   __parserFactory.createFileEntryParser(getSystemName());
+   }
 }
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r151489 - in jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp: AllTests.java FTPClientConfigFunctionalTest.java

2005-02-05 Thread scohen
Author: scohen
Date: Sat Feb  5 04:56:14 2005
New Revision: 151489

URL: http://svn.apache.org/viewcvs?view=revrev=151489
Log:
Add new functional test submitted by W. McDonald Buck accessing a server at 
NOAA to test timezone functionality.

Added:

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
Modified:

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/AllTests.java

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/AllTests.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/AllTests.java?view=diffr1=151488r2=151489
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/AllTests.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/AllTests.java
 Sat Feb  5 04:56:14 2005
@@ -28,6 +28,7 @@
 //$JUnit-BEGIN$
 suite.addTest(ListingFunctionalTest.suite());
 suite.addTestSuite(FTPClientConfigTest.class);
+suite.addTestSuite(FTPClientConfigFunctionalTest.class);
 //$JUnit-END$
 return suite;
 }

Added: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java?view=autorev=151489
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
 (added)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
 Sat Feb  5 04:56:14 2005
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.net.ftp;
+
+import junit.framework.TestCase;
+import java.io.IOException;
+import java.net.SocketException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.TimeZone;
+import java.util.TreeSet;
+
+/*
+ * This test was contributed in a different form by W. McDonald Buck
+ * of Boulder, Colorado, to help fix some bugs with the FTPClientConfig
+ * in a real world setting.  It is a perfect functional test for the
+ * Time Zone functionality of FTPClientConfig.
+ * 
+ * A publicly accessible FTP server at the US National Oceanographic and
+ * Atmospheric Adminstration houses a directory which contains 
+ * 300 files, named sn. to sn.0300. Every ten minutes or so 
+ * the next file in sequence is rewritten with new data. Thus the directory 
+ * contains observations for more than 24 hours of data.  Since the server
+ * has its clock set to GMT this is an excellent functional test for any
+ * machine in a different time zone. 
+ */
+
+public class FTPClientConfigFunctionalTest extends TestCase {
+
+private FTPClient FTP = new FTPClient(); 
+private FTPClientConfig FTPConf; 
+
+
+/**
+ * 
+ */
+public FTPClientConfigFunctionalTest() {
+super();
+
+   }
+
+/* 
+ * @throws java.lang.Exception
+ */
+protected void setUp() throws Exception {
+super.setUp();
+   FTPConf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
+   FTPConf.setServerTimeZoneId(GMT); 
+   FTP.configure(FTPConf); 
+try {
+FTP.connect(tgftp.nws.noaa.gov);
+FTP.login(anonymous,[EMAIL PROTECTED]);
+FTP.changeWorkingDirectory(SL.us008001/DF.an/DC.sflnd/DS.metar);
+FTP.enterLocalPassiveMode();
+} catch (SocketException e) {
+e.printStackTrace();
+} catch (IOException e) {
+e.printStackTrace();
+}
+}
+/* 
+ * @throws java.lang.Exception
+ */
+protected void tearDown() throws Exception {
+FTP.disconnect();
+super.tearDown();
+}
+/**
+ * @param arg0
+ */
+public FTPClientConfigFunctionalTest(String arg0) {
+super(arg0);
+}
+
+   
+private TreeSet getSortedList(FTPFile[] files) {
+// create a TreeSet which will sort each element
+// as it is added.
+TreeSet sorted = new TreeSet(new

svn commit: r151490 - jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java

2005-02-05 Thread scohen
Author: scohen
Date: Sat Feb  5 05:17:28 2005
New Revision: 151490

URL: http://svn.apache.org/viewcvs?view=revrev=151490
Log:
fix syntax error

Modified:

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java?view=diffr1=151489r2=151490
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
 Sat Feb  5 05:17:28 2005
@@ -22,7 +22,6 @@
 import java.util.Calendar;
 import java.util.Comparator;
 import java.util.Iterator;
-import java.util.TimeZone;
 import java.util.TreeSet;
 
 /*
@@ -143,7 +142,7 @@
 
 // test that notwithstanding any time zone differences, the newest file
 // is older than now.
-assertTrue(lastfile.getTimestamp().getTime().before(now);
+assertTrue(lastfile.getTimestamp().getTime().before(now));
 Calendar first = firstfile.getTimestamp();
 
 // test that the oldest is less than two days older than the newest 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r151509 - jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java

2005-02-05 Thread scohen
Author: scohen
Date: Sat Feb  5 08:31:31 2005
New Revision: 151509

URL: http://svn.apache.org/viewcvs?view=revrev=151509
Log:
add comment illustrating value of functionality

Modified:

jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java

Modified: 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java?view=diffr1=151508r2=151509
==
--- 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/test/org/apache/commons/net/ftp/FTPClientConfigFunctionalTest.java
 Sat Feb  5 08:31:31 2005
@@ -37,6 +37,14 @@
  * contains observations for more than 24 hours of data.  Since the server
  * has its clock set to GMT this is an excellent functional test for any
  * machine in a different time zone. 
+ * 
+ * Noteworthy is the fact that the ftp routines in some web browsers don't 
+ * work as well as this.  They can't, since they have no way of knowing the 
+ * server's time zone.  Depending on the local machine's position relative 
+ * to GMT and the time of day, the browsers may decide that a timestamp 
+ * would be in the  future if given the current year, so they assume the 
+ * year to be  last year.  This illustrates the value of FTPClientConfig's 
+ * time zone functionality.
  */
 
 public class FTPClientConfigFunctionalTest extends TestCase {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r151467 - in jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp: FTPClient.java parser/ConfigurableFTPFileEntryParserImpl.java

2005-02-04 Thread scohen
Author: scohen
Date: Fri Feb  4 18:04:42 2005
New Revision: 151467

URL: http://svn.apache.org/viewcvs?view=revrev=151467
Log:
Fix bugs found by W. McDonald Buck having to do with 
faulty passing of configuration.


Modified:

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java

jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java?view=diffr1=151466r2=151467
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
 Fri Feb  4 18:04:42 2005
@@ -298,6 +298,7 @@
 __dataTimeout = -1;
 __remoteVerificationEnabled = true;
 __parserFactory = new DefaultFTPFileEntryParserFactory();
+__configuration  = null;
 }
 
 
@@ -311,7 +312,6 @@
 __fileFormat = FTP.NON_PRINT_TEXT_FORMAT;
 __fileTransferMode   = FTP.STREAM_TRANSFER_MODE;
 __restartOffset  = 0;
-__configuration  = null;
 __systemName = null;
 __entryParser= null;
 __bufferSize= Util.DEFAULT_COPY_BUFFER_SIZE;
@@ -2343,9 +2343,9 @@
 parserKey = getSystemName();

}
+} else {
+   __entryParser =  
__parserFactory.createFileEntryParser(parserKey);
 }
-  
-__entryParser =  __parserFactory.createFileEntryParser(parserKey);
 }
 
 return initiateListParsing(__entryParser, pathname);

Modified: 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java?view=diffr1=151466r2=151467
==
--- 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java
 (original)
+++ 
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java
 Fri Feb  4 18:04:42 2005
@@ -89,10 +89,17 @@
 public void configure(FTPClientConfig config)
 {
 if (this.timestampParser instanceof Configurable) {
+FTPClientConfig defaultCfg = getDefaultConfiguration();
if (config != null) {
+   if (null == config.getDefaultDateFormatStr()) {
+   
config.setDefaultDateFormatStr(defaultCfg.getDefaultDateFormatStr());
+   }
+   if (null == config.getRecentDateFormatStr()) {
+   
config.setRecentDateFormatStr(defaultCfg.getRecentDateFormatStr());
+   }
((Configurable)this.timestampParser).configure(config);
} else {
-   
((Configurable)this.timestampParser).configure(getDefaultConfiguration());
+   ((Configurable)this.timestampParser).configure(defaultCfg);
}
 }
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/telnet TelnetClientTest.java

2005-01-13 Thread scohen
scohen  2005/01/13 04:07:59

  Modified:net/src/test/org/apache/commons/net/telnet
TelnetClientTest.java
  Log:
  minor refactoring to make more efficient
  
  Revision  ChangesPath
  1.12  +10 -10
jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java
  
  Index: TelnetClientTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TelnetClientTest.java 12 Jan 2005 03:51:32 -  1.11
  +++ TelnetClientTest.java 13 Jan 2005 12:07:59 -  1.12
  @@ -31,7 +31,7 @@
   public class TelnetClientTest 
   extends TestCase implements TelnetNotificationHandler
   {
  -private static final int CONNECTIONS = 5;
  +private static final int CONNECTIONS = 4;
   protected TelnetTestSimpleServer[] servers =
   new TelnetTestSimpleServer[CONNECTIONS];
   protected TelnetClient[] clients = 
  @@ -62,10 +62,12 @@
  servers[socket] = new TelnetTestSimpleServer(port);
  switch (socket) {
case 0:
  -clients[socket] = new TelnetClient();
  + clients[socket] = new TelnetClient();
  +// redundant but makes code clearer.
  +clients[socket].setReaderThread(true);
break;
case 1:
  -clients[socket] = new TelnetClient();
  + clients[socket] = new TelnetClient();
   TerminalTypeOptionHandler ttopt = 
   new TerminalTypeOptionHandler(VT100, false, 
false, true, false);
   EchoOptionHandler echoopt = 
  @@ -84,12 +86,10 @@
   clients[socket] = new TelnetClient();
   clients[socket].setReaderThread(false);
break;
  - case 4:
  -clients[socket] = new TelnetClient();
  -clients[socket].setReaderThread(true);
  - break;
  }
  clients[socket].connect(127.0.0.1, port);
  +   
  +   // only increment socket number on success
  socket++;
  System.err.println(opened client-server connection on port  
+ port);
  } catch (IOException e) {
  @@ -761,8 +761,8 @@
   negotiation1_ok = true;
   }
   
  -InputStream is2 = servers[4].getInputStream();
  -OutputStream os2 = servers[4].getOutputStream();
  +InputStream is2 = servers[0].getInputStream();
  +OutputStream os2 = servers[0].getOutputStream();
   Thread.sleep(1000);
   is2.skip(is2.available());
   os2.write(send1);
  @@ -777,7 +777,7 @@
   }
   
   assertTrue(!clients[3].getReaderThread());
  -assertTrue(clients[4].getReaderThread());
  +assertTrue(clients[0].getReaderThread());
   assertTrue(read_ok);
   assertTrue(negotiation1_ok);
   assertTrue(negotiation2_ok);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/telnet TelnetClientTest.java

2005-01-13 Thread scohen
scohen  2005/01/13 04:45:30

  Modified:net/src/test/org/apache/commons/net/telnet
TelnetClientTest.java
  Log:
  Further refactoring, remove annoying array syntax introduced in 1.11.
  
  Revision  ChangesPath
  1.13  +130 -86   
jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java
  
  Index: TelnetClientTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TelnetClientTest.java 13 Jan 2005 12:07:59 -  1.12
  +++ TelnetClientTest.java 13 Jan 2005 12:45:30 -  1.13
  @@ -31,12 +31,39 @@
   public class TelnetClientTest 
   extends TestCase implements TelnetNotificationHandler
   {
  -private static final int CONNECTIONS = 4;
  -protected TelnetTestSimpleServer[] servers =
  -new TelnetTestSimpleServer[CONNECTIONS];
  -protected TelnetClient[] clients = 
  -new TelnetClient[CONNECTIONS];
  +/**
  + * Handy holder to hold both sides of the connection
  + * used in testing for clarity.
  + */
  +private class TestConnection {
  +TelnetTestSimpleServer server;
  +TelnetClient client;
  +int port;
  +TestConnection(
  +TelnetTestSimpleServer server, 
  +TelnetClient client, 
  +int port) 
  +{
  +this.server = server;
  +this.client = client;
  +this.port = port;
  +}
  +protected void close() {
  +TelnetClientTest.this.closeConnection(
  +this.server, this.client, this.port);
  +}  
  +}   
  +
  +// four connections with different properties
  +// to use in tests.
  +private TestConnection STANDARD;
  +private TestConnection OPTIONS;
  +private TestConnection ANSI;
  +private TestConnection NOREAD;
  +
  +private int NUM_CONNECTIONS = 4;
   
  + 
   protected int numdo = 0;
   protected int numdont = 0;
   protected int numwill = 0;
  @@ -56,18 +83,20 @@
   protected void setUp() throws Exception 
   {
   super.setUp();
  -for (int port = , socket = 0; socket  CONNECTIONS  port  
4000; port++) 
  +for (int port = , socket = 0; socket  NUM_CONNECTIONS  port  
4000; port++) 
   {
  +TelnetTestSimpleServer server = null;
  +TelnetClient client = null;
  try {
  -   servers[socket] = new TelnetTestSimpleServer(port);
  -   switch (socket) {
  +   server = new TelnetTestSimpleServer(port);
  +switch (socket) {
case 0:
  - clients[socket] = new TelnetClient();
  + client = new TelnetClient();
   // redundant but makes code clearer.
  -clients[socket].setReaderThread(true);
  +client.setReaderThread(true);
break;
case 1:
  - clients[socket] = new TelnetClient();
  + client = new TelnetClient();
   TerminalTypeOptionHandler ttopt = 
   new TerminalTypeOptionHandler(VT100, false, 
false, true, false);
   EchoOptionHandler echoopt = 
  @@ -75,25 +104,40 @@
   SuppressGAOptionHandler gaopt = 
   new SuppressGAOptionHandler(true, true, true, 
true);
   
  -clients[socket].addOptionHandler(ttopt);
  -clients[socket].addOptionHandler(echoopt);
  -clients[socket].addOptionHandler(gaopt);
  +client.addOptionHandler(ttopt);
  +client.addOptionHandler(echoopt);
  +client.addOptionHandler(gaopt);
break;
case 2:
  -clients[socket] = new TelnetClient(ANSI);
  +client = new TelnetClient(ANSI);
break;
case 3:
  -clients[socket] = new TelnetClient();
  -clients[socket].setReaderThread(false);
  +client = new TelnetClient();
  +client.setReaderThread(false);
break;
  }
  -   clients[socket].connect(127.0.0.1, port);
  +   client.connect(127.0.0.1, port);
  +   switch (socket

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/telnet TelnetClientTest.java

2005-01-11 Thread scohen
scohen  2005/01/11 19:51:32

  Modified:net/src/test/org/apache/commons/net/telnet
TelnetClientTest.java
  Log:
  Refactor test so that GUMP (hopefully) no longer breaks.  Use JUnit
  setUp() and tearDown() methods to avoid leaving sockets open from one
  test to the next and to avoid tying pass/fail of test to any particular
  socket number which may or may not be open on some machine.
  
  Revision  ChangesPath
  1.11  +144 -169  
jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java
  
  Index: TelnetClientTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TelnetClientTest.java 29 Jun 2004 04:54:32 -  1.10
  +++ TelnetClientTest.java 12 Jan 2005 03:51:32 -  1.11
  @@ -15,6 +15,8 @@
*/
   package org.apache.commons.net.telnet;
   import junit.framework.TestCase;
  +
  +import java.io.IOException;
   import java.io.InputStream;
   import java.io.OutputStream;
   import java.io.PipedInputStream;
  @@ -29,12 +31,12 @@
   public class TelnetClientTest 
   extends TestCase implements TelnetNotificationHandler
   {
  -protected TelnetTestSimpleServer server1;
  -protected TelnetTestSimpleServer server2;
  -protected TelnetTestSimpleServer server3;
  -protected TelnetClient tc1;
  -protected TelnetClient tc2;
  -protected TelnetClient tc3;
  +private static final int CONNECTIONS = 5;
  +protected TelnetTestSimpleServer[] servers =
  +new TelnetTestSimpleServer[CONNECTIONS];
  +protected TelnetClient[] clients = 
  +new TelnetClient[CONNECTIONS];
  +
   protected int numdo = 0;
   protected int numdont = 0;
   protected int numwill = 0;
  @@ -51,48 +53,86 @@
   /***
* open connections needed for the tests for the test.
***/
  -protected void openConnections() throws Exception
  +protected void setUp() throws Exception 
   {
  -server1 = new TelnetTestSimpleServer();
  -server2 = new TelnetTestSimpleServer(3334);
  -server3 = new TelnetTestSimpleServer(3335);
  -
  -tc1 = new TelnetClient();
  -tc2 = new TelnetClient();
  -tc3 = new TelnetClient(ANSI);
  -
  -TerminalTypeOptionHandler ttopt = 
  -new TerminalTypeOptionHandler(VT100, false, false, true, 
false);
  -EchoOptionHandler echoopt = 
  -new EchoOptionHandler(true, false, true, false);
  -SuppressGAOptionHandler gaopt = 
  -new SuppressGAOptionHandler(true, true, true, true);
  -
  -tc2.addOptionHandler(ttopt);
  -tc2.addOptionHandler(echoopt);
  -tc2.addOptionHandler(gaopt);
  -
  -tc1.connect(127.0.0.1, );
  -tc2.connect(127.0.0.1, 3334);
  -tc3.connect(127.0.0.1, 3335);
  -Thread.sleep(1000);
  +super.setUp();
  +for (int port = , socket = 0; socket  CONNECTIONS  port  
4000; port++) 
  +{
  +   try {
  +   servers[socket] = new TelnetTestSimpleServer(port);
  +   switch (socket) {
  + case 0:
  +clients[socket] = new TelnetClient();
  + break;
  + case 1:
  +clients[socket] = new TelnetClient();
  +TerminalTypeOptionHandler ttopt = 
  +new TerminalTypeOptionHandler(VT100, false, 
false, true, false);
  +EchoOptionHandler echoopt = 
  +new EchoOptionHandler(true, false, true, false);
  +SuppressGAOptionHandler gaopt = 
  +new SuppressGAOptionHandler(true, true, true, 
true);
  +
  +clients[socket].addOptionHandler(ttopt);
  +clients[socket].addOptionHandler(echoopt);
  +clients[socket].addOptionHandler(gaopt);
  + break;
  + case 2:
  +clients[socket] = new TelnetClient(ANSI);
  + break;
  + case 3:
  +clients[socket] = new TelnetClient();
  +clients[socket].setReaderThread(false);
  + break;
  + case 4:
  +clients[socket] = new TelnetClient();
  +clients[socket].setReaderThread(true);
  + break;
  +   }
  +   clients[socket].connect(127.0.0.1, port);
  +   socket

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java FTPClientConfig.java

2005-01-02 Thread scohen
scohen  2005/01/02 07:50:15

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
FTPClientConfig.java
  Log:
  Update documentation to reflect new FTPClientConfig functionality.
  
  Revision  ChangesPath
  1.49  +15 -11
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- FTPClient.java2 Jan 2005 03:28:13 -   1.48
  +++ FTPClient.java2 Jan 2005 15:50:15 -   1.49
  @@ -105,10 +105,9 @@
* for EBCDIC.  To transfer EBCDIC and other unsupported file types you
* must create your own filter InputStreams and OutputStreams and wrap
* them around the streams returned or required by the FTPClient methods.
  - * FTPClient uses the NetASCII filter streams in
  - * [EMAIL PROTECTED] org.apache.commons.net.io} to provide
  - * transparent handling of ASCII files.  We will consider incorporating
  - * EBCDIC support if there is enough demand.
  + * FTPClient uses the [EMAIL PROTECTED] ToNetASCIIOutputStream NetASCII}  
  + * filter streams to provide transparent handling of ASCII files.  We will 
  + * consider incorporating EBCDIC support if there is enough demand.
* p
* code FTP.NON_PRINT_TEXT_FORMAT /code,
* code FTP.STREAM_TRANSFER_MODE /code, and
  @@ -209,23 +208,28 @@
*}
* /pre
* p
  + * For examples of using FTPClient on servers whose directory listings 
  + * ul 
  + * liuse languages other than English/li
  + * liuse date formats other than the American English standard codeMM 
d /code/li
  + * liare in different timezones and you need accurate timestamps for 
dependency checking 
  + * as in Ant/li
  + * /ulsee [EMAIL PROTECTED]  FTPClientConfig  FTPClientConfig}.
  + * p
* NOTE: If you experience problems with unwanted firing of 
presetSoTimeout()/pre 
* during periods of client inactivity, this can be alleviated by calling 
presetReaderThread(false)/pre.
* For more details, see a 
href=http://issues.apache.org/bugzilla/show_bug.cgi?id=31122;this thread/a. 
* /p
  - * p * @author Daniel F. Savarese
  + * p 
  + * @author Daniel F. Savarese
* @see FTP
* @see FTPConnectionClosedException
* @see FTPFileEntryParser
* @see FTPFileEntryParserFactory
* @see DefaultFTPFileEntryParserFactory
  + * @see FTPClientConfig
* @see org.apache.commons.net.MalformedServerReplyException
  - ***/
  -
  -/**
  - * To change the template for this generated type comment go to
  - * Window - Preferences - Java - Code Style - Code Templates - Comments
  - */
  + **/
   public class FTPClient extends FTP
   implements Configurable
   {
  
  
  
  1.2   +84 -0 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
  
  Index: FTPClientConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClientConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FTPClientConfig.java  2 Jan 2005 03:17:49 -   1.1
  +++ FTPClientConfig.java  2 Jan 2005 15:50:15 -   1.2
  @@ -42,6 +42,90 @@
* only need to be explicitly invoked by the user of this package for problem
* cases that previous implementations could not solve.
* /p
  + * h3Examples of use of FTPClientConfig/h3
  + * Use cases:
  + * You are trying to access a server that 
  + * ul 
  + * lilists files with timestamps that use month names in languages other 
  + * than English/li
  + * lilists files with timestamps that use date formats other 
  + * than the American English standard codeMM dd /code/li
  + * liis in different timezone and you need accurate timestamps for 
  + * dependency checking as in Ant/li
  + * /ul
  + * p
  + * Unpaged (whole list) access on a UNIX server that uses French month names
  + * but uses the standard codeMMM d /code date formatting
  + * pre
  + *FTPClient f=FTPClient();
  + *FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
  + * conf.setServerLanguageCode(fr);
  + *f.connect(server);
  + *f.login(username, password);
  + *FTPFile[] files = listFiles(directory);
  + * /pre
  + * /p
  + * p
  + * Paged access on a UNIX server that uses Danish month names
  + * and European date formatting in Denmark's time zone, when you
  + * are in some other time zone.
  + * pre
  + *FTPClient f=FTPClient();
  + *FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
  + * conf.setServerLanguageCode(da);
  + * conf.setDefaultDateFormat(d MMM );
  + *conf.setRecentDateFormat(d MMM HH:mm

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClientConfig.java

2005-01-02 Thread scohen
scohen  2005/01/02 08:00:51

  Modified:net/src/java/org/apache/commons/net/ftp FTPClientConfig.java
  Log:
  correct examples.
  
  Revision  ChangesPath
  1.3   +14 -9 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
  
  Index: FTPClientConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClientConfig.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FTPClientConfig.java  2 Jan 2005 15:50:15 -   1.2
  +++ FTPClientConfig.java  2 Jan 2005 16:00:51 -   1.3
  @@ -59,7 +59,8 @@
* pre
*FTPClient f=FTPClient();
*FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
  - * conf.setServerLanguageCode(fr);
  + *conf.setServerLanguageCode(fr);
  + *f.configure(conf);
*f.connect(server);
*f.login(username, password);
*FTPFile[] files = listFiles(directory);
  @@ -72,10 +73,11 @@
* pre
*FTPClient f=FTPClient();
*FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
  - * conf.setServerLanguageCode(da);
  - * conf.setDefaultDateFormat(d MMM );
  - *conf.setRecentDateFormat(d MMM HH:mm); 
  - * conf.setTimeZoneId(Europe/Copenhagen);
  + *conf.setServerLanguageCode(da);
  + *conf.setDefaultDateFormat(d MMM );
  + *conf.setRecentDateFormat(d MMM HH:mm);
  + *conf.setTimeZoneId(Europe/Copenhagen);
  + *f.configure(conf);
*f.connect(server);
*f.login(username, password);
*FTPListParseEngine engine =
  @@ -95,8 +97,9 @@
* pre
*FTPClient f=FTPClient();
*FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_VMS);
  - * conf.setShortMonthNames(
  - *   
jan|feb|mar|apr|ma#xED;|j#xFA;n|j#xFA;l|#xE1;g#xFA;|sep|okt|n#xF3;v|des);
  + *conf.setShortMonthNames(
  + *
jan|feb|mar|apr|ma#xED;|j#xFA;n|j#xFA;l|#xE1;g#xFA;|sep|okt|n#xF3;v|des);
  + *f.configure(conf);
*f.connect(server);
*f.login(username, password);
*FTPFile[] files = listFiles(directory);
  @@ -109,7 +112,8 @@
* pre
*FTPClient f=FTPClient();
*FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_NT);
  - * conf.setTimeZoneId(America/Denver);
  + *conf.setTimeZoneId(America/Denver);
  + *f.configure(conf);
*f.connect(server);
*f.login(username, password);
*FTPFile[] files = listFiles(directory);
  @@ -120,7 +124,8 @@
* pre
*FTPClient f=FTPClient();
*FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
  - * conf.setTimeZoneId(America/Denver);
  + *conf.setTimeZoneId(America/Denver);
  + *f.configure(conf);
*f.connect(server);
*f.login(username, password);
*FTPFile[] files = listFiles(directory);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net .cvsignore

2005-01-01 Thread scohen
scohen  2005/01/01 19:17:50

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
FTPFileEntryParserImpl.java
   net/src/test/org/apache/commons/net/ftp/parser
OS2FTPEntryParserTest.java
VMSFTPEntryParserTest.java AllTests.java
NTFTPEntryParserTest.java
   net/src/java/org/apache/commons/net/ftp/parser
OS400FTPEntryParser.java UnixFTPEntryParser.java
VMSFTPEntryParser.java
FTPFileEntryParserFactory.java
VMSVersioningFTPEntryParser.java
DefaultFTPFileEntryParserFactory.java
NTFTPEntryParser.java
RegexFTPFileEntryParserImpl.java
OS2FTPEntryParser.java
   net  .cvsignore
  Added:   net/src/test/org/apache/commons/net/ftp
FTPClientConfigTest.java AllTests.java
   net/src/java/org/apache/commons/net/ftp FTPClientConfig.java
Configurable.java
   net/src/test/org/apache/commons/net/ftp/parser
FTPTimestampParserImplTest.java
   net/src/java/org/apache/commons/net/ftp/parser
FTPTimestampParser.java FTPTimestampParserImpl.java
ConfigurableFTPFileEntryParserImpl.java
  Log:
  Implementation of Configurable date parsing
  
  Revision  ChangesPath
  1.1  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/FTPClientConfigTest.java?rev=1.1
  
  
  1.1  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/AllTests.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/AllTests.java?rev=1.1
  
  
  1.47  +35 -8 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java.diff?r1=1.46r2=1.47
  
  
  1.10  +2 -3  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java.diff?r1=1.9r2=1.10
  
  
  1.1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClientConfig.java?rev=1.1
  
  
  1.1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/Configurable.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/Configurable.java?rev=1.1
  
  
  1.10  +8 -6  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/OS2FTPEntryParserTest.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/OS2FTPEntryParserTest.java.diff?r1=1.9r2=1.10
  
  
  1.17  +17 -6 
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/VMSFTPEntryParserTest.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/VMSFTPEntryParserTest.java.diff?r1=1.16r2=1.17
  
  
  1.3   +1 -0  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/AllTests.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/AllTests.java.diff?r1=1.2r2=1.3
  
  
  1.16  +5 -5  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java.diff?r1=1.15r2=1.16
  
  
  1.1  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java?rev=1.1
  
  
  1.6   +68 -49
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java.diff?r1=1.5r2=1.6
  
  
  1.21  +64 -60
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java.diff?r1=1.20r2=1.21
  
  
  1.26  +53 -36
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java
  
  
http://cvs.apache.org/viewcvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java.diff

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java

2005-01-01 Thread scohen
scohen  2005/01/01 19:28:13

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
  Log:
  Implementation of Configurable date parsing
  
  Revision  ChangesPath
  1.48  +4 -1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- FTPClient.java2 Jan 2005 03:17:49 -   1.47
  +++ FTPClient.java2 Jan 2005 03:28:13 -   1.48
  @@ -2640,9 +2640,12 @@
   
   
   /** 
  - * Implementation of the [EMAIL PROTECTED] 
org.apache.commons.net.ftp.Configurable Configurable} interface. 
  + * Implementation of the [EMAIL PROTECTED] Configurable Configurable} 
interface. 
* In the case of this class, configuring merely makes the config object 
available for the
* factory methods that construct parsers.
  + * @param config [EMAIL PROTECTED] FTPClientConfig FTPClientConfig} 
object used to 
  + * provide non-standard configurations to the parser.
  + * @since 1.4
*/
   public void configure(FTPClientConfig config) {
this.__configuration = config;
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java FTPListParseEngine.java

2004-09-14 Thread scohen
scohen  2004/09/14 19:24:04

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
FTPListParseEngine.java
  Log:
  add comments indicating the possibility of null entries in the arrays returned by 
listFiles(), etc.
  
  Revision  ChangesPath
  1.40  +21 -1 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- FTPClient.java8 Sep 2004 17:14:46 -   1.39
  +++ FTPClient.java15 Sep 2004 02:24:04 -  1.40
  @@ -2029,6 +2029,10 @@
* @return The list of file information contained in the given path in
* the format determined by the parser represented by the
* code parserKey /code parameter.
  + * pb 
  + *  NOTE:/b This array may contain null members if any of the 
  + * individual file listings failed to parse.  The caller should 
  + * check each entry for null before referencing it.
* @exception FTPConnectionClosedException
*   If the FTP server prematurely closes the connection
*   as a result of the client being idle or some other
  @@ -2119,7 +2123,11 @@
* used.
* p
* @return The list of file information contained in the current directory
  - * in the format determined by the autodetection mechanism
  + * in the format determined by the autodetection mechanism.  
  + * pb 
  + *  NOTE:/b This array may contain null members if any of the 
  + * individual file listings failed to parse.  The caller should 
  + * check each entry for null before referencing it.
* @exception FTPConnectionClosedException
*   If the FTP server prematurely closes the connection
*   as a result of the client being idle or some other
  @@ -2406,6 +2414,10 @@
* @param pathname  The file or directory to list.
* @return The list of file information contained in the given path in
* the format determined by the code parser /code parameter.
  + * pb 
  + *  NOTE:/b This array may contain null members if any of the 
  + * individual file listings failed to parse.  The caller should 
  + * check each entry for null before referencing it.
* @exception FTPConnectionClosedException
*  If the FTP server prematurely closes the connection as a result
*  of the client being idle or some other reason causing the server
  @@ -2416,6 +2428,10 @@
*
* @return The list of file information contained in the given path in
* the format determined bycode parserKey /codeparameter.
  + * pb 
  + *  NOTE:/b This array may contain null members if any of the 
  + * individual file listings failed to parse.  The caller should 
  + * check each entry for null before referencing it.
*
* @exception IOException
* @since 5 Jan 2004
  @@ -2453,6 +2469,10 @@
*
* @return The list of file information contained in the given path in
* the format determined by the code parser /code parameter.
  + * pb 
  + *  NOTE:/b This array may contain null members if any of the 
  + * individual file listings failed to parse.  The caller should 
  + * check each entry for null before referencing it.
* @exception FTPConnectionClosedException
*   If the FTP server prematurely closes the connection as a 
result
*   of the client being idle or some other reason causing the 
server
  
  
  
  1.8   +13 -1 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPListParseEngine.java
  
  Index: FTPListParseEngine.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPListParseEngine.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FTPListParseEngine.java   22 Apr 2004 00:48:07 -  1.7
  +++ FTPListParseEngine.java   15 Sep 2004 02:24:04 -  1.8
  @@ -147,6 +147,10 @@
* objects starting at the current position of this iterator within its
* list and at least the number of elements which  exist in the list at
* and after its current position.
  + * pb 
  + * NOTE:/b This array may contain null members if any of the 
  + * individual file listings failed

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser DefaultFTPFileEntryParserFactory.java

2004-06-29 Thread scohen
scohen  2004/06/29 19:24:01

  Modified:net/src/java/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactory.java
  Log:
  update documentation to reflect OS/400 detection.
  
  Revision  ChangesPath
  1.14  +4 -1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
  
  Index: DefaultFTPFileEntryParserFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultFTPFileEntryParserFactory.java 21 Apr 2004 23:30:33 -  1.13
  +++ DefaultFTPFileEntryParserFactory.java 30 Jun 2004 02:24:01 -  1.14
  @@ -36,7 +36,9 @@
* First it attempts to interpret the supplied key as a fully
* qualified classname of a class implementing the
* FTPFileEntryParser interface.  If that succeeds, a parser
  - * object of this class is instantiated and is returned.
  + * object of this class is instantiated and is returned; 
  + * otherwise it attempts to interpret the key as an identirier
  + * commonly used by the FTP SYST command to identify systems.
* p/
* If codekey/code is not recognized as a fully qualified
* classname known to the system, this method will then attempt
  @@ -57,6 +59,7 @@
*   licodeunix/code/li
*   licodewindows/code/li
*   licodeos/2/code/li
  + *   licodeos/400/code/li
*   licodevms/code/li
*   /ul
* @return the FTPFileEntryParser corresponding to the supplied key.
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net project.xml

2004-06-25 Thread scohen
scohen  2004/06/25 19:19:23

  Modified:net/xdocs changes.xml
   net  project.xml
  Log:
  getting ready for release 1.2.2
  
  Revision  ChangesPath
  1.28  +8 -0  jakarta-commons/net/xdocs/changes.xml
  
  Index: changes.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/xdocs/changes.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- changes.xml   7 May 2004 11:05:00 -   1.27
  +++ changes.xml   26 Jun 2004 02:19:23 -  1.28
  @@ -21,6 +21,14 @@
 /properties
   
 body
  +release version=1.2.2 date=June 25, 2004 description=fix release
  +  action dev=scohen type=fix
  + fixed bug in the way FTPClient.listFiles worked when a directory was 
not
  + specified.  Current directory was not being 'remembered'.  This was 
most 
  + problematic in the dependent ftp task of Ant.
  +  /action
  +/release   
  +
   release version=1.2.1 date=May 6, 2004 description=fix release
 action dev=scohen type=fix
changed code that rendered package uncompilable under JDK 1.2
  
  
  
  1.54  +11 -1 jakarta-commons/net/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/project.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- project.xml   6 Jun 2004 18:02:46 -   1.53
  +++ project.xml   26 Jun 2004 02:19:23 -  1.54
  @@ -19,7 +19,7 @@
 
 nameJakarta Commons Net/name
 idcommons-net/id
  -  currentVersion1.2.1/currentVersion
  +  currentVersion1.2.2/currentVersion
 inceptionYear1997/inceptionYear
 shortDescriptionJakarta Commons Net/shortDescription
 description/
  @@ -79,6 +79,16 @@
 id1.1.0/id
 name1.1.0/name
 tagNET_1_1_0/tag
  +/version
  +version
  +  id1.2.0/id
  +  name1.2.0/name
  +  tagNET_1_2_0/tag
  +/version
  +version
  +  id1.2.1/id
  +  name1.2.1/name
  +  tagNET_1_2_1/tag
   /version
 /versions

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/xdocs changes.xml

2004-06-25 Thread scohen
scohen  2004/06/25 19:24:47

  Modified:net/xdocs changes.xml
  Log:
  getting ready for release 1.2.2
  
  Revision  ChangesPath
  1.29  +3 -0  jakarta-commons/net/xdocs/changes.xml
  
  Index: changes.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/xdocs/changes.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- changes.xml   26 Jun 2004 02:19:23 -  1.28
  +++ changes.xml   26 Jun 2004 02:24:47 -  1.29
  @@ -27,6 +27,9 @@
specified.  Current directory was not being 'remembered'.  This was 
most 
problematic in the dependent ftp task of Ant.
 /action
  +  action dev=scohen type=fix
  + fixed handling of certain unusual special file types in the Unix 
parser.
  +  /action
   /release   
   
   release version=1.2.1 date=May 6, 2004 description=fix release
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser UnixFTPEntryParser.java

2004-06-21 Thread scohen
scohen  2004/06/21 19:30:33

  Modified:net/src/java/org/apache/commons/net/ftp/parser
UnixFTPEntryParser.java
  Log:
  PR: 29689
  add support for special file types, those identified in directory listings
  with a type code (first character) of s, S, m, or p.
  
  Revision  ChangesPath
  1.17  +8 -3  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
  
  Index: UnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- UnixFTPEntryParser.java   22 Apr 2004 03:27:19 -  1.16
  +++ UnixFTPEntryParser.java   22 Jun 2004 02:30:33 -  1.17
  @@ -57,7 +57,7 @@
*state)
*/
   private static final String REGEX =
  -([bcdlf-])
  +([bcdlfmpSs-])
   + 
(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+
   + (\\d+)\\s+
   + (\\S+)\\s+
  @@ -115,6 +115,7 @@
   String name = group(25);
   String endtoken = group(26);
   
  +// bcdlfmpSs-
   switch (typeStr.charAt(0))
   {
   case 'd':
  @@ -127,8 +128,12 @@
   case 'c':
   isDevice = true;
   // break; - fall through
  +case 'f':
  +case '-':
  + type = FTPFile.FILE_TYPE;
  + break;
   default:
  -type = FTPFile.FILE_TYPE;
  +type = FTPFile.UNKNOWN_TYPE;
   }
   
   file.setType(type);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java

2004-06-16 Thread scohen
scohen  2004/06/16 16:30:19

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
  Log:
  Fix bug caused by having FTPClient.listFiles() call
  FTPClient.listFiles() instead
  of passing in a null
  PR:  25668
  
  Revision  ChangesPath
  1.36  +2 -2  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- FTPClient.java22 Apr 2004 00:48:07 -  1.35
  +++ FTPClient.java16 Jun 2004 23:30:19 -  1.36
  @@ -2143,7 +2143,7 @@
   public FTPFile[] listFiles()
   throws IOException
   {
  -return listFiles();
  +return listFiles((String) null);
   }
   
   /**
  @@ -2182,7 +2182,7 @@
   public FTPListParseEngine initiateListParsing()
   throws IOException
   {
  -return initiateListParsing();
  +return initiateListParsing((String) null);
   }
   
   /**
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net project.xml

2004-05-28 Thread scohen
scohen  2004/05/28 15:57:01

  Modified:net  project.xml
  Log:
  bump up version number after last release
  
  Revision  ChangesPath
  1.52  +1 -1  jakarta-commons/net/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/project.xml,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- project.xml   7 May 2004 03:09:41 -   1.51
  +++ project.xml   28 May 2004 22:57:01 -  1.52
  @@ -19,7 +19,7 @@
 
 nameJakarta Commons Net/name
 idcommons-net/id
  -  currentVersion1.3.0-dev/currentVersion
  +  currentVersion1.2.1/currentVersion
 inceptionYear1997/inceptionYear
 shortDescriptionJakarta Commons Net/shortDescription
 description/
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser UnixFTPEntryParserTest.java

2004-05-28 Thread scohen
scohen  2004/05/28 16:00:28

  Modified:net/src/test/org/apache/commons/net/ftp/parser
UnixFTPEntryParserTest.java
  Log:
  PR: 29195
  As part of the process of investigating bug 29195, discovered that
  we had no test case testing a directory listing without a group, which
  is optional.  Adding such a test helped to prove that commons-net
  code was not the problem and is a valuable addition to our test
  suite.
  
  Revision  ChangesPath
  1.12  +3 -2  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
  
  Index: UnixFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- UnixFTPEntryParserTest.java   22 Apr 2004 00:48:07 -  1.11
  +++ UnixFTPEntryParserTest.java   28 May 2004 23:00:28 -  1.12
  @@ -67,7 +67,8 @@
   -rw-r--r-T   1 500  500 0 Mar 25 08:20 testSticky,
   -rwxr-xr-t   1 500  500 0 Mar 25 08:21 testStickyExec,
   -rwSr-Sr--   1 500  500 0 Mar 25 08:22 testSuid,
  --rwsr-sr--   1 500  500 0 Mar 25 08:23 testSuidExec
  +-rwsr-sr--   1 500  500 0 Mar 25 08:23 testSuidExec,
  + -rw-r--r--   1 13518644 May 25 12:12 std
   };
   
   /**
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/xdocs changes.xml

2004-05-06 Thread scohen
scohen  2004/05/06 20:02:29

  Modified:net/xdocs changes.xml
  Log:
  clean up release notes page
  
  Revision  ChangesPath
  1.26  +7 -6  jakarta-commons/net/xdocs/changes.xml
  
  Index: changes.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/xdocs/changes.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- changes.xml   5 May 2004 03:47:21 -   1.25
  +++ changes.xml   7 May 2004 03:02:29 -   1.26
  @@ -21,13 +21,13 @@
 /properties
   
 body
  -release version=1.2.1 date=May 6, 2004
  +release version=1.2.1 date=May 6, 2004 description=fix release
 action dev=scohen type=fix
  - remove any code that would render package uncompilable under JDK 1.2
  + changed code that rendered package uncompilable under JDK 1.2
 /action
   /release   
   
  -release version=1.2.0 date=April 30, 2004
  +release version=1.2.0 date=April 30, 2004 description=autodetection of 
system for listings
 action dev=scohen type=fix
Mario Ivankovits lt;[EMAIL PROTECTED]gt; added
functionality supporting correct handling of the quot;dirstylequot; 
  @@ -62,7 +62,7 @@
 /action
   /release
   
  -release version=1.1.1 date=TBD
  +release version=1.1.1 date=TBD description=last jdk1.1 compatible 
release
 action dev=scohen type=fix
   Removed all JDK 1.1 incompatibilities that had been introduced
   unintentionally in previous versions.  Release 1.1.1 is the last 
  @@ -73,7 +73,7 @@
 /action
   /release
   
  -release version=1.1.0 date=October 23, 2003
  +release version=1.1.0 date=October 23, 2003 description=many enhancements 
and bug fixes
 action dev=dfs type=add
   Rory Winston lt;[EMAIL PROTECTED]gt; provided
   patches to add the following extended NNTP commands to
  @@ -139,7 +139,8 @@
   New parsers merged with mainline with support for old list parsers.
 /action
   /release
  -release version=1.0.0 date=02/23/2003
  +
  +release version=1.0.0 date=02/23/2003 description=first jakarta release
 action dev=brekke type=add
   Added a migration document for moving from NetComponents to Commons/Net.
 /action
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net build.xml

2004-05-06 Thread scohen
scohen  2004/05/06 20:08:43

  Modified:net  build.xml
  Log:
  update version number to 1.3.0-dev after release of 1.2.1
  
  Revision  ChangesPath
  1.25  +2 -2  jakarta-commons/net/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/build.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- build.xml 5 May 2004 03:40:22 -   1.24
  +++ build.xml 7 May 2004 03:08:43 -   1.25
  @@ -33,7 +33,7 @@
 /property
 property name=javadocdir value=dist/docs/api
 /property
  -  property name=final.name value=commons-net-1.2.1
  +  property name=final.name value=commons-net-1.3.0-dev
 /property
 target name=init description=o Initializes some properties
   mkdir dir=${libdir}
  @@ -140,7 +140,7 @@
   /tstamp
   property name=copyright value=Copyright amp;copy;  Apache Software 
Foundation. All Rights Reserved.
   /property
  -property name=title value=Jakarta Commons/Net 1.2.1 API
  +property name=title value=Jakarta Commons/Net 1.2.0 API
   /property
   javadoc use=true private=true destdir=${javadocdir} author=true 
version=true sourcepath=src/java packagenames=org.apache.commons.net.*
 classpath
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net project.xml

2004-05-06 Thread scohen
scohen  2004/05/06 20:09:41

  Modified:net  project.xml
  Log:
  update version number to 1.3.0-dev after release of 1.2.1
  
  Revision  ChangesPath
  1.51  +1 -6  jakarta-commons/net/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/project.xml,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- project.xml   5 May 2004 03:40:22 -   1.50
  +++ project.xml   7 May 2004 03:09:41 -   1.51
  @@ -19,7 +19,7 @@
 
 nameJakarta Commons Net/name
 idcommons-net/id
  -  currentVersion1.2.1/currentVersion
  +  currentVersion1.3.0-dev/currentVersion
 inceptionYear1997/inceptionYear
 shortDescriptionJakarta Commons Net/shortDescription
 description/
  @@ -79,11 +79,6 @@
 id1.1.0/id
 name1.1.0/name
 tagNET_1_1_0/tag
  -/version
  -version
  -  id1.2.0/id
  -  name1.2.0/name
  -  tagNET_1_2_0/tag
   /version
 /versions

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser NTFTPEntryParser.java

2004-05-04 Thread scohen
scohen  2004/05/04 15:44:05

  Modified:net/src/test/org/apache/commons/net/telnet
TelnetClientTest.java
   net/src/java/org/apache/commons/net/ftp/parser
NTFTPEntryParser.java
  Log:
  Ensure compatibility with JDKs  1.4
  PR:28775
  
  Revision  ChangesPath
  1.9   +103 -58   
jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java
  
  Index: TelnetClientTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/telnet/TelnetClientTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TelnetClientTest.java 29 Feb 2004 10:26:56 -  1.8
  +++ TelnetClientTest.java 4 May 2004 22:44:05 -   1.9
  @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
  -package org.apache.commons.net.telnet;

  +package org.apache.commons.net.telnet;
   import junit.framework.TestCase;
   import java.io.InputStream;
   import java.io.OutputStream;
  @@ -26,7 +26,8 @@
* p
* @author Bruno D'Avanzo
***/
  -public class TelnetClientTest extends TestCase implements TelnetNotificationHandler
  +public class TelnetClientTest 
  +extends TestCase implements TelnetNotificationHandler
   {
   protected TelnetTestSimpleServer server1;
   protected TelnetTestSimpleServer server2;
  @@ -60,9 +61,12 @@
   tc2 = new TelnetClient();
   tc3 = new TelnetClient(ANSI);
   
  -TerminalTypeOptionHandler ttopt = new TerminalTypeOptionHandler(VT100, 
false, false, true, false);
  -EchoOptionHandler echoopt = new EchoOptionHandler(true, false, true, false);
  -SuppressGAOptionHandler gaopt = new SuppressGAOptionHandler(true, true, 
true, true);
  +TerminalTypeOptionHandler ttopt = 
  +new TerminalTypeOptionHandler(VT100, false, false, true, false);
  +EchoOptionHandler echoopt = 
  +new EchoOptionHandler(true, false, true, false);
  +SuppressGAOptionHandler gaopt = 
  +new SuppressGAOptionHandler(true, true, true, true);
   
   tc2.addOptionHandler(ttopt);
   tc2.addOptionHandler(echoopt);
  @@ -105,9 +109,12 @@
   byte buffread2[] = new byte[9];
   byte expected2[] =
   {
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.WILL, 
(byte)TelnetOption.ECHO,
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.WILL, 
(byte)TelnetOption.SUPPRESS_GO_AHEAD,
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.DO, 
(byte)TelnetOption.SUPPRESS_GO_AHEAD,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.WILL, 
  +(byte) TelnetOption.ECHO,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.WILL, 
  +(byte) TelnetOption.SUPPRESS_GO_AHEAD,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.DO, 
  +(byte) TelnetOption.SUPPRESS_GO_AHEAD,
   };
   
   openConnections();
  @@ -181,65 +188,83 @@
   byte buffread1[] = new byte[6];
   byte send1[] =
   {
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.DO, (byte)15,
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.WILL, (byte)15,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.DO, (byte) 15,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.WILL, (byte) 15,
   };
   byte expected1[] =
   {
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.WONT, (byte)15,
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.DONT, (byte)15,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.WONT, (byte) 15,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.DONT, (byte) 15,
   };
   
   boolean negotiation2_ok = false;
   byte buffread2[] = new byte[9];
   byte send2[] =
   {
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.DO, 
(byte)TelnetOption.TERMINAL_TYPE,
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.DONT, 
(byte)TelnetOption.ECHO,
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.DO, 
(byte)TelnetOption.SUPPRESS_GO_AHEAD,
  -(byte)TelnetCommand.IAC, (byte)TelnetCommand.WONT, 
(byte)TelnetOption.SUPPRESS_GO_AHEAD
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.DO, 
  +(byte) TelnetOption.TERMINAL_TYPE,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.DONT, 
  +(byte) TelnetOption.ECHO,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.DO, 
  +(byte) TelnetOption.SUPPRESS_GO_AHEAD,
  +(byte) TelnetCommand.IAC, (byte) TelnetCommand.WONT, 
  +(byte) TelnetOption.SUPPRESS_GO_AHEAD
   };
   byte expected2

cvs commit: jakarta-commons/net build.xml project.xml

2004-05-01 Thread scohen
scohen  2004/05/01 11:55:22

  Modified:net  build.xml project.xml
  Log:
  update version number to 1.3.0-dev after release of 1.2.0
  
  Revision  ChangesPath
  1.23  +1 -1  jakarta-commons/net/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/build.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- build.xml 29 Feb 2004 10:27:29 -  1.22
  +++ build.xml 1 May 2004 18:55:21 -   1.23
  @@ -33,7 +33,7 @@
 /property
 property name=javadocdir value=dist/docs/api
 /property
  -  property name=final.name value=commons-net-1.2.0-dev
  +  property name=final.name value=commons-net-1.3.0-dev
 /property
 target name=init description=o Initializes some properties
   mkdir dir=${libdir}
  
  
  
  1.49  +1 -1  jakarta-commons/net/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/project.xml,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- project.xml   1 May 2004 00:59:32 -   1.48
  +++ project.xml   1 May 2004 18:55:21 -   1.49
  @@ -19,7 +19,7 @@
 
 nameJakarta Commons Net/name
 idcommons-net/id
  -  currentVersion1.2.0/currentVersion
  +  currentVersion1.3.0-dev/currentVersion
 inceptionYear1997/inceptionYear
 shortDescriptionJakarta Commons Net/shortDescription
 description/
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser UnixFTPEntryParser.java RegexFTPFileEntryParserImpl.java

2004-04-21 Thread scohen
scohen  2004/04/21 20:27:19

  Modified:net/src/java/org/apache/commons/net/ftp/parser
UnixFTPEntryParser.java
RegexFTPFileEntryParserImpl.java
  Log:
  make checkstyle happy by converting tabs to spaces.
  
  Revision  ChangesPath
  1.16  +220 -220  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
  
  Index: UnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- UnixFTPEntryParser.java   22 Apr 2004 00:48:07 -  1.15
  +++ UnixFTPEntryParser.java   22 Apr 2004 03:27:19 -  1.16
  @@ -30,223 +30,223 @@
*/
   public class UnixFTPEntryParser extends RegexFTPFileEntryParserImpl
   {
  - /**
  -  * months abbreviations looked for by this parser.  Also used
  -  * to determine which month is matched by the parser
  -  */
  - private static final String MONTHS =
  - (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec);
  -
  - /**
  -  * this is the regular expression used by this parser.
  -  *
  -  * Permissions:
  -  *r   the file is readable
  -  *w   the file is writable
  -  *x   the file is executable
  -  *-   the indicated permission is not granted
  -  *L   mandatory locking occurs during access (the set-group-ID bit is
  -  *on and the group execution bit is off)
  -  *s   the set-user-ID or set-group-ID bit is on, and the corresponding
  -  *user or group execution bit is also on
  -  *S   undefined bit-state (the set-user-ID bit is on and the user
  -  *execution bit is off)
  -  *t   the 1000 (octal) bit, or sticky bit, is on [see chmod(1)], and
  -  *execution is on
  -  *T   the 1000 bit is turned on, and execution is off (undefined bit-
  -  *state)
  -  */
  - private static final String REGEX =
  - ([bcdlf-])
  - + 
(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+
  - + (\\d+)\\s+
  - + (\\S+)\\s+
  - + (?:(\\S+)\\s+)?
  - + (\\d+)\\s+
  - + MONTHS + \\s+
  - + ((?:[0-9])|(?:[0-2][0-9])|(?:3[0-1]))\\s+
  - + 
((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])|(?:[1-9])):([012345]\\d))\\s+
  - + (\\S+)(\\s*.*);
  -
  -
  - /**
  -  * The sole constructor for a UnixFTPEntryParser object.
  -  *
  -  * @exception IllegalArgumentException
  -  * Thrown if the regular expression is unparseable.  Should not be seen
  -  * under normal conditions.  It it is seen, this is a sign that
  -  * codeREGEX/code is  not a valid regular expression.
  -  */
  - public UnixFTPEntryParser()
  - {
  - super(REGEX);
  - }
  -
  - /**
  -  * Parses a line of a unix (standard) FTP server file listing and converts
  -  * it into a usable format in the form of an code FTPFile /code
  -  * instance.  If the file listing line doesn't describe a file,
  -  * code null /code is returned, otherwise a code FTPFile /code
  -  * instance representing the files in the directory is returned.
  -  * p
  -  * @param entry A line of text from the file listing
  -  * @return An FTPFile instance corresponding to the supplied entry
  -  */
  - public FTPFile parseFTPEntry(String entry)
  - {
  -
  - FTPFile file = new FTPFile();
  - file.setRawListing(entry);
  - int type;
  - boolean isDevice = false;
  -
  - if (matches(entry))
  - {
  - String typeStr = group(1);
  - String hardLinkCount = group(15);
  - String usr = group(16);
  - String grp = group(17);
  - String filesize = group(18);
  - String mo = group(19);
  - String da = group(20);
  - String yr = group(22);
  - String hr = group(23);
  - String min = group(24);
  - String name = group(25);
  - String endtoken = group(26);
  -
  - switch (typeStr.charAt(0))
  - {
  - case 'd':
  - type = FTPFile.DIRECTORY_TYPE;
  - break;
  - case 'l':
  - type = FTPFile.SYMBOLIC_LINK_TYPE;
  - break;
  - case 'b':
  - case 'c

cvs commit: jakarta-commons/net project.xml

2004-04-19 Thread scohen
scohen  2004/04/19 18:11:39

  Modified:net/xdocs changes.xml
   net  project.xml
  Log:
  getting ready for release of 1.2.0-rc1
  
  Revision  ChangesPath
  1.22  +18 -2 jakarta-commons/net/xdocs/changes.xml
  
  Index: changes.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/xdocs/changes.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- changes.xml   10 Apr 2004 21:12:14 -  1.21
  +++ changes.xml   20 Apr 2004 01:11:38 -  1.22
  @@ -21,11 +21,24 @@
 /properties
   
 body
  -release version=1.2.0-dev date=In CVS
  +release version=1.2.0-rc1 date=April 19, 2004
  +  action dev=scohen type=fix
  + Mario Ivankovits lt;[EMAIL PROTECTED]gt; added
  + functionality supporting correct handling of the quot;dirstylequot; 
  + attribute of NT and OS400 servers that allows them to mimic Unix ftp 
servers.
  + and a bug fix affecting handling of sticky and suid bits on Unix FTP 
servers.
  +  /action
  +  action dev=scohen type=add
  + Mario Ivankovits lt;[EMAIL PROTECTED]gt; added parser for OS400.
  +  /action
  +   action dev=jbrekke,scohen type=fix
  + Added a functional junit test testing list parsing against real 
servers 
  + and fix several bugs found through this test.
  +   /action
 action dev=dfs type=add
   Ted Wise lt;[EMAIL PROTECTED]gt; provided a
   a href=http://issues.apache.org/bugzilla/show_bug.cgi?id=24078;
  -patche/a to add the XHDR extended NNTP command.
  +patch/a to add the XHDR extended NNTP command.
 /action
 action dev=scohen,dfs type=update
   Deprecated FTPFileListParser interface, DefaultFTPFileListParser
  @@ -42,6 +55,7 @@
   autodetection.
 /action
   /release
  +
   release version=1.1.1 date=TBD
 action dev=scohen type=fix
   Removed all JDK 1.1 incompatibilities that had been introduced
  @@ -52,6 +66,7 @@
   and later.
 /action
   /release
  +
   release version=1.1.0 date=October 23, 2003
 action dev=dfs type=add
   Rory Winston lt;[EMAIL PROTECTED]gt; provided
  @@ -71,6 +86,7 @@
   drwxr-xr-x 1 usernameftp 512 Jan 29 23:32 prog
   /pre
 /action
  +
 action dev=dfs type=fix
   Applied variation of fix suggested by Matthieu Recouly
   lt;[EMAIL PROTECTED]gt; so that
  
  
  
  1.46  +1 -1  jakarta-commons/net/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/project.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- project.xml   10 Apr 2004 21:20:21 -  1.45
  +++ project.xml   20 Apr 2004 01:11:38 -  1.46
  @@ -19,7 +19,7 @@
 
 nameJakarta Commons Net/name
 idcommons-net/id
  -  currentVersion1.2.0-dev/currentVersion
  +  currentVersion1.2.0-rc1/currentVersion
 inceptionYear1997/inceptionYear
 shortDescriptionJakarta Commons Net/shortDescription
 description/
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser DefaultFTPFileEntryParserFactory.java

2004-04-15 Thread scohen
scohen  2004/04/15 18:52:24

  Modified:net/src/test/org/apache/commons/net/ftp/parser
FTPParseTestFramework.java
OS400FTPEntryParserTest.java
DefaultFTPFileEntryParserFactoryTest.java
NTFTPEntryParserTest.java
   net/src/java/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactory.java
  Added:   net/src/test/org/apache/commons/net/ftp/parser
CompositeFTPParseTestFramework.java
  Log:
  OS400 also has the abillity to change the dirstyle to unix.  This patch
  enables this feature and generalizes the Composite pattern originally
  introduced for NT.
  PR: 28247
  Submitted by: [EMAIL PROTECTED] (Mario Ivankovits)
  Reviewed by:  Steve Cohen
  
  Revision  ChangesPath
  1.7   +26 -2 
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/FTPParseTestFramework.java
  
  Index: FTPParseTestFramework.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/FTPParseTestFramework.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FTPParseTestFramework.java10 Mar 2004 03:37:16 -  1.6
  +++ FTPParseTestFramework.java16 Apr 2004 01:52:24 -  1.7
  @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
  -package org.apache.commons.net.ftp.parser;

  +package org.apache.commons.net.ftp.parser;
   import junit.framework.TestCase;
   
   import java.text.SimpleDateFormat;
  @@ -54,6 +54,8 @@
   FTPFile f = parser.parseFTPEntry(test);
   assertNull(Should have Failed to parse  + test, 
  f);
  +
  +doAdditionalBadTests(test, f);
   }
   }
   
  @@ -73,7 +75,29 @@
   FTPFile f = parser.parseFTPEntry(test);
   assertNotNull(Failed to parse  + test, 
 f);
  +
  +doAdditionalGoodTests(test, f);
  +}
  +}
  +
  +/**
  + * during processing you could hook here to do additional tests
  + *
  + * @param test raw entry
  + * @param fparsed entry
  + */
  +protected void doAdditionalGoodTests(String test, FTPFile f)
  +{
   }
  +
  +/**
  + * during processing you could hook here to do additional tests
  + *
  + * @param test raw entry
  + * @param fparsed entry
  + */
  +protected void doAdditionalBadTests(String test, FTPFile f)
  +{
   }
   
   /**
  
  
  
  1.2   +180 -148  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java
  
  Index: OS400FTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OS400FTPEntryParserTest.java  26 Mar 2004 12:54:57 -  1.1
  +++ OS400FTPEntryParserTest.java  16 Apr 2004 01:52:24 -  1.2
  @@ -1,148 +1,180 @@
  -/*

  - * Copyright 2004 The Apache Software Foundation

  - *

  - * Licensed under the Apache License, Version 2.0 (the License);

  - * you may not use this file except in compliance with the License.

  - * You may obtain a copy of the License at

  - *

  - * http://www.apache.org/licenses/LICENSE-2.0

  - *

  - * Unless required by applicable law or agreed to in writing, software

  - * distributed under the License is distributed on an AS IS BASIS,

  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  - * See the License for the specific language governing permissions and

  - * limitations under the License.

  - */

  -package org.apache.commons.net.ftp.parser;

  -import java.util.Calendar;

  -

  -import junit.framework.TestSuite;

  -

  -import org.apache.commons.net.ftp.FTPFile;

  -import org.apache.commons.net.ftp.FTPFileEntryParser;

  -

  -/**

  - * @version $Id$

  - */

  -

  -public class OS400FTPEntryParserTest extends FTPParseTestFramework

  -{

  -

  -private static final String[] badsamples =

  -{

  - PEP  4019 04/03/18 18:58:16 STMF   einladung.zip,

  - PEP   422 03/24 14:06:26 *STMF  readme,

  - PEP  6409 04/03/24 30:06:29 *STMF  build.xml,

  - PEP USR 36864 04/03/24 14:06:34 *DIR   dir1/,

  - PEP 3686404/03/24 14:06:47 *DIR   zdir2/

  -};

  -

  -private static final String[] goodsamples =

  -{

  - PEP  4019 04/03/18 18:58:16 *STMF  einladung.zip

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser NTFTPEntryParserTest.java

2004-04-15 Thread scohen
scohen  2004/04/15 19:08:00

  Modified:net/src/test/org/apache/commons/net/ftp/parser
NTFTPEntryParserTest.java
  Log:
  added test code to test problem in bug 28406
  PR: 28406
  
  Revision  ChangesPath
  1.11  +10 -2 
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
  
  Index: NTFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- NTFTPEntryParserTest.java 16 Apr 2004 01:52:24 -  1.10
  +++ NTFTPEntryParserTest.java 16 Apr 2004 02:08:00 -  1.11
  @@ -131,7 +131,15 @@
   assertTrue(Should have been a directory., 
  dir.isDirectory());
   assertEquals(absoft2, dir.getName());
  -assertEquals(0, dir.getSize());   
  +assertEquals(0, dir.getSize());
  +
  +dir = getParser().parseFTPEntry(12-03-96  06:38AM   DIR  
123456);
  +assertNotNull(Could not parse entry., dir);
  +assertTrue(Should have been a directory., 
  + dir.isDirectory());
  +assertEquals(123456, dir.getName());
  +assertEquals(0, dir.getSize());
  +
   }
   
   /**
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser NTFTPEntryParserTest.java

2004-04-15 Thread scohen
scohen  2004/04/15 20:30:13

  Modified:net/src/java/org/apache/commons/net/ftp/parser
UnixFTPEntryParser.java
   net/src/test/org/apache/commons/net/ftp/parser
NTFTPEntryParserTest.java
  Log:
  add possibility for a 1-digit hour (without leading zero) in
  UnixFTPEntryParser because the NT flavor of this parser allows
  for it even if the unix version doesn't.
  PR:28066
  
  Revision  ChangesPath
  1.13  +2 -2  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
  
  Index: UnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- UnixFTPEntryParser.java   6 Apr 2004 04:40:57 -   1.12
  +++ UnixFTPEntryParser.java   16 Apr 2004 03:30:13 -  1.13
  @@ -65,7 +65,7 @@
   + (\\d+)\\s+
   + MONTHS + \\s+
   + ((?:[0-9])|(?:[0-2][0-9])|(?:3[0-1]))\\s+
  -+ ((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s+
  ++ ((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])|(?:[1-9])):([012345]\\d))\\s+
   + (\\S+)(\\s*.*);
   
   
  
  
  
  1.12  +22 -2 
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
  
  Index: NTFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NTFTPEntryParserTest.java 16 Apr 2004 02:08:00 -  1.11
  +++ NTFTPEntryParserTest.java 16 Apr 2004 03:30:13 -  1.12
  @@ -15,6 +15,8 @@
*/
   package org.apache.commons.net.ftp.parser;
   
  +import java.util.Calendar;
  +
   import junit.framework.TestSuite;
   import org.apache.commons.net.ftp.FTPFile;
   import org.apache.commons.net.ftp.FTPFileEntryParser;
  @@ -154,7 +156,25 @@
   assertTrue(Should have been a file., 
  f.isFile());
   assertEquals(AUTOEXEC.BAK, f.getName());
  -assertEquals(828, f.getSize());   
  +assertEquals(828, f.getSize()); 
  +
  +// test an NT-unix style listing that does NOT have a leading zero  
  +// on the hour.
  +
  +f = getParser().parseFTPEntry(
  + -rw-rw-r--   1 mqmmqm  17707 Mar 12  3:33 
killmq.sh.log);
  +assertNotNull(Could not parse entry., f);
  +Calendar cal = Calendar.getInstance();
  +cal.setTime(f.getTimestamp().getTime());
  +assertEquals(hour, 3, cal.get(Calendar.HOUR));
  +assertTrue(Should have been a file., 
  + f.isFile());
  +assertEquals(17707, f.getSize()); 
  +
  +
  +
  +
  + 
   }
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp ListingFunctionalTest.java

2004-04-05 Thread scohen
scohen  2004/04/05 21:40:57

  Modified:net/src/java/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParser.java
OS400FTPEntryParser.java UnixFTPEntryParser.java
VMSFTPEntryParser.java
DefaultFTPFileEntryParserFactory.java
NTFTPEntryParser.java OS2FTPEntryParser.java
   net/src/test/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactoryTest.java
NTFTPEntryParserTest.java
   net/src/java/org/apache/commons/net/ftp
FTPFileListParserImpl.java
FTPFileEntryParserImpl.java
   net/src/test/org/apache/commons/net/ftp
ListingFunctionalTest.java
  Added:   net/src/java/org/apache/commons/net/ftp/parser
CompositeFileEntryParser.java
RegexFTPFileEntryParserImpl.java
   net/src/test/org/apache/commons/net/ftp/parser AllTests.java
  Log:
  PR: 28215
  Submitted by: Mario Ivankovits
  Reviewed by:  Steve Cohen
  
  Mario Ivankovits' elegant solution to the problem of the
  ambidextrous NT parser which can be configured as either
  Windows format or Unix.
  
  Changed slightly by Steve Cohen, avoiding spreading the impression that
  a server might switch at random between windows and unix.  Slight
  refactoring of tests to reflect the above change, and added
  AllTests.java in the ftp.parser directory.  Also moved Mario's new
  CompositeFileEntryParser and RegexFileEntryParser into the
  ftp.parser package.
  
  Revision  ChangesPath
  1.10  +3 -4  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java
  
  Index: EnterpriseUnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- EnterpriseUnixFTPEntryParser.java 29 Feb 2004 10:26:56 -  1.9
  +++ EnterpriseUnixFTPEntryParser.java 6 Apr 2004 04:40:57 -   1.10
  @@ -13,11 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
  -package org.apache.commons.net.ftp.parser;

  +package org.apache.commons.net.ftp.parser;
   import java.util.Calendar;
   
   import org.apache.commons.net.ftp.FTPFile;
  -import org.apache.commons.net.ftp.FTPFileEntryParserImpl;
   
   /**
* Parser for the Connect Enterprise Unix FTP Server From Sterling Commerce.  
  @@ -33,7 +32,7 @@
* @see org.apache.commons.net.ftp.FTPFileEntryParser FTPFileEntryParser (for usage 
instructions)
* @see org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
*/
  -public class EnterpriseUnixFTPEntryParser extends FTPFileEntryParserImpl
  +public class EnterpriseUnixFTPEntryParser extends RegexFTPFileEntryParserImpl
   {
   
   /**
  
  
  
  1.2   +135 -136  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java
  
  Index: OS400FTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OS400FTPEntryParser.java  26 Mar 2004 12:54:57 -  1.1
  +++ OS400FTPEntryParser.java  6 Apr 2004 04:40:57 -   1.2
  @@ -1,136 +1,135 @@
  -/*

  - * Copyright 2004 The Apache Software Foundation

  - *

  - * Licensed under the Apache License, Version 2.0 (the License);

  - * you may not use this file except in compliance with the License.

  - * You may obtain a copy of the License at

  - *

  - * http://www.apache.org/licenses/LICENSE-2.0

  - *

  - * Unless required by applicable law or agreed to in writing, software

  - * distributed under the License is distributed on an AS IS BASIS,

  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  - * See the License for the specific language governing permissions and

  - * limitations under the License.

  - */

  -package org.apache.commons.net.ftp.parser;

  -

  -import org.apache.commons.net.ftp.FTPFile;

  -import org.apache.commons.net.ftp.FTPFileEntryParserImpl;

  -

  -import java.util.Calendar;

  -

  -/**

  - * @version $Id$

  - */

  -

  -public class OS400FTPEntryParser extends FTPFileEntryParserImpl

  -{

  - private static final String REGEX =

  - (\\S+)\\s+// user

  - + (\\d+)\\s+  // size

  - + (\\d\\d)/(\\d\\d)/(\\d\\d)\\s+ // year/month/day

  - + ([0-2][0-9]):([0-5][0-9]):([0

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser UnixFTPEntryParserTest.java

2004-03-26 Thread scohen
scohen  2004/03/26 04:32:21

  Modified:net/src/java/org/apache/commons/net/ftp/parser
UnixFTPEntryParser.java
   net/src/test/org/apache/commons/net/ftp/parser
UnixFTPEntryParserTest.java
  Log:
  PR:27858
  Obtained from:[EMAIL PROTECTED] (Mario Ivankovits)
  Submitted by:Steve Cohen
  Reviewed by:  Steve Cohen
  CVS: --
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  ChangesPath
  1.11  +28 -4 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
  
  Index: UnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UnixFTPEntryParser.java   18 Mar 2004 13:47:02 -  1.10
  +++ UnixFTPEntryParser.java   26 Mar 2004 12:32:21 -  1.11
  @@ -40,10 +40,26 @@
   
   /**
* this is the regular expression used by this parser.
  +  *
  +  * Permissions:
  +  *r   the file is readable
  +  *w   the file is writable
  +  *x   the file is executable
  +  *-   the indicated permission is not granted
  +  *L   mandatory locking occurs during access (the set-group-ID bit is
  +  *on and the group execution bit is off)
  +  *s   the set-user-ID or set-group-ID bit is on, and the corresponding
  +  *user or group execution bit is also on
  +  *S   undefined bit-state (the set-user-ID bit is on and the user
  +  *execution bit is off)
  +  *t   the 1000 (octal) bit, or sticky bit, is on [see chmod(1)], and
  +  *execution is on
  +  *T   the 1000 bit is turned on, and execution is off (undefined bit-
  +  *state)
*/
   private static final String REGEX =
   ([bcdlf-])
  -+ (((r|-)(w|-)(x|-))((r|-)(w|-)(x|-))((r|-)(w|-)(x|-)))\\s+
  ++ 
(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+
   + (\\d+)\\s+
   + (\\S+)\\s+
   + (?:(\\S+)\\s+)?
  @@ -126,8 +142,16 @@
  (!group(g).equals(-)));
   file.setPermission(access, FTPFile.WRITE_PERMISSION,
  (!group(g + 1).equals(-)));
  -file.setPermission(access, FTPFile.EXECUTE_PERMISSION,
  -   (!group(g + 2).equals(-)));
  +
  + String execPerm = group(g + 2);
  + if (!execPerm.equals(-)  
!Character.isUpperCase(execPerm.charAt(0)))
  + {
  + file.setPermission(access, FTPFile.EXECUTE_PERMISSION, true);
  + }
  + else
  + {
  + file.setPermission(access, 
FTPFile.EXECUTE_PERMISSION, false);
  + }
   }
   
   if (!isDevice)
  
  
  
  1.9   +6 -2  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
  
  Index: UnixFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- UnixFTPEntryParserTest.java   29 Feb 2004 10:26:53 -  1.8
  +++ UnixFTPEntryParserTest.java   26 Mar 2004 12:32:21 -  1.9
  @@ -23,7 +23,7 @@
   
   /**
* @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
  - * @versionn $Id$
  + * @version $Id$
*/
   public class UnixFTPEntryParserTest extends FTPParseTestFramework
   {
  @@ -63,7 +63,11 @@
   -rw-r--r--   1 500  500   166 Nov 12  2001 
73131-testtes2.AFP,  
   -rw-r--r--   1 500  500   204 Aug  5 07:35 
testRemoteUPCopyNIX

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser OS400FTPEntryParser.java DefaultFTPFileEntryParserFactory.java

2004-03-26 Thread scohen
scohen  2004/03/26 04:54:57

  Modified:net/src/test/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactoryTest.java
   net/src/java/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactory.java
  Added:   net/src/test/org/apache/commons/net/ftp/parser
OS400FTPEntryParserTest.java
   net/src/java/org/apache/commons/net/ftp/parser
OS400FTPEntryParser.java
  Log:
  PR: 27753
  Submitted by:[EMAIL PROTECTED] (Mario Ivankovits)
  Reviewed by:  Steve Cohen
  
  Revision  ChangesPath
  1.4   +3 -0  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java
  
  Index: DefaultFTPFileEntryParserFactoryTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultFTPFileEntryParserFactoryTest.java 29 Feb 2004 10:26:53 -  1.3
  +++ DefaultFTPFileEntryParserFactoryTest.java 26 Mar 2004 12:54:57 -  1.4
  @@ -58,6 +58,9 @@
   parser = factory.createFileEntryParser(OS/2);
   assertTrue(parser instanceof OS2FTPEntryParser);
   
  +parser = factory.createFileEntryParser(OS/400);
  +assertTrue(parser instanceof OS400FTPEntryParser);
  +
   try {
   parser = factory.createFileEntryParser(OS2FTPFileEntryParser);
   fail(Exception should have been thrown. \OS2FTPFileEntryParser\ is 
not a recognized key);
  
  
  
  1.1  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java
  
  Index: OS400FTPEntryParserTest.java
  ===
  /*

   * Copyright 2004 The Apache Software Foundation

   *

   * Licensed under the Apache License, Version 2.0 (the License);

   * you may not use this file except in compliance with the License.

   * You may obtain a copy of the License at

   *

   * http://www.apache.org/licenses/LICENSE-2.0

   *

   * Unless required by applicable law or agreed to in writing, software

   * distributed under the License is distributed on an AS IS BASIS,

   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

   * See the License for the specific language governing permissions and

   * limitations under the License.

   */

  package org.apache.commons.net.ftp.parser;

  import java.util.Calendar;

  

  import junit.framework.TestSuite;

  

  import org.apache.commons.net.ftp.FTPFile;

  import org.apache.commons.net.ftp.FTPFileEntryParser;

  

  /**

   * @version $Id: OS400FTPEntryParserTest.java,v 1.1 2004/03/26 12:54:57 scohen Exp $

   */

  

  public class OS400FTPEntryParserTest extends FTPParseTestFramework

  {

  

  private static final String[] badsamples =

  {

PEP  4019 04/03/18 18:58:16 STMF   einladung.zip,

PEP   422 03/24 14:06:26 *STMF  readme,

PEP  6409 04/03/24 30:06:29 *STMF  build.xml,

PEP USR 36864 04/03/24 14:06:34 *DIR   dir1/,

PEP 3686404/03/24 14:06:47 *DIR   zdir2/

  };

  

  private static final String[] goodsamples =

  {

PEP  4019 04/03/18 18:58:16 *STMF  einladung.zip,

PEP   422 04/03/24 14:06:26 *STMF  readme,

PEP  6409 04/03/24 14:06:29 *STMF  build.xml,

PEP 36864 04/03/24 14:06:34 *DIR   dir1/,

PEP 36864 04/03/24 14:06:47 *DIR   zdir2/

  };

  

  /**

   * @see junit.framework.TestCase#TestCase(String)

   */

  public OS400FTPEntryParserTest(String name)

  {

  super(name);

  }

  

  /**

   * @see FTPParseTestFramework#getBadListing()

   */

  protected String[] getBadListing()

  {

  return(badsamples);

  }

  

  /**

   * @see FTPParseTestFramework#getGoodListing()

   */

  protected String[] getGoodListing()

  {

  return(goodsamples);

  }

  

  /**

   * @see FTPParseTestFramework#getParser()

   */

  protected FTPFileEntryParser getParser()

  {

  return(new OS400FTPEntryParser());

  }

  

  /**

   * @see FTPParseTestFramework#testParseFieldsOnDirectory()

   */

  public void testParseFieldsOnDirectory() throws Exception

  {

  FTPFile f = getParser().parseFTPEntry(PEP 36864 04/03/24 
14:06:34 *DIR   dir1/);

  assertNotNull(Could not parse entry

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser UnixFTPEntryParser.java

2004-03-18 Thread scohen
scohen  2004/03/18 05:47:02

  Modified:net/src/java/org/apache/commons/net/ftp/parser
UnixFTPEntryParser.java
  Log:
  Fix bug 27556.  It is decided that this change could not possibly cause
  harm and is therefore approved.
  CVS: --
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  ChangesPath
  1.10  +2 -2  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java
  
  Index: UnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- UnixFTPEntryParser.java   29 Feb 2004 10:26:56 -  1.9
  +++ UnixFTPEntryParser.java   18 Mar 2004 13:47:02 -  1.10
  @@ -50,7 +50,7 @@
   + (\\d+)\\s+
   + MONTHS + \\s+
   + ((?:[0-9])|(?:[0-2][0-9])|(?:3[0-1]))\\s+
  -+ ((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s
  ++ ((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s+
   + (\\S+)(\\s*.*);
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser NTFTPEntryParser.java

2004-03-09 Thread scohen
scohen  2004/03/09 19:37:16

  Modified:net/src/test/org/apache/commons/net/ftp/parser
FTPParseTestFramework.java
NTFTPEntryParserTest.java
   net/src/java/org/apache/commons/net/ftp/parser
NTFTPEntryParser.java
  Log:
  fix bug 27085
  
  Revision  ChangesPath
  1.6   +2 -2  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/FTPParseTestFramework.java
  
  Index: FTPParseTestFramework.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/FTPParseTestFramework.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FTPParseTestFramework.java29 Feb 2004 10:26:53 -  1.5
  +++ FTPParseTestFramework.java10 Mar 2004 03:37:16 -  1.6
  @@ -118,6 +118,6 @@
   {
   super.setUp();
   parser = getParser();
  -df = new SimpleDateFormat(EEE MMM dd kk:mm:ss , Locale.US);
  +df = new SimpleDateFormat(EEE MMM dd HH:mm:ss , Locale.US);
   }
   }
  
  
  
  1.8   +3 -3  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
  
  Index: NTFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NTFTPEntryParserTest.java 29 Feb 2004 10:26:53 -  1.7
  +++ NTFTPEntryParserTest.java 10 Mar 2004 03:37:16 -  1.8
  @@ -114,9 +114,9 @@
*/
   public void testParseFieldsOnFile() throws Exception
   {
  -FTPFile f = getParser().parseFTPEntry(05-22-97  08:08AM  
828 AUTOEXEC.BAK);
  +FTPFile f = getParser().parseFTPEntry(05-22-97  12:08AM  
828 AUTOEXEC.BAK);
   assertNotNull(Could not parse entry., f);
  -assertEquals(Thu May 22 08:08:00 1997, 
  +assertEquals(Thu May 22 00:08:00 1997, 
df.format(f.getTimestamp().getTime()));
   assertTrue(Should have been a file., 
  f.isFile());
  
  
  
  1.12  +20 -5 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
  
  Index: NTFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NTFTPEntryParser.java 29 Feb 2004 10:26:56 -  1.11
  +++ NTFTPEntryParser.java 10 Mar 2004 03:37:16 -  1.12
  @@ -103,10 +103,9 @@
   }
   
   Calendar cal = Calendar.getInstance();
  +cal.clear();
  +
   //set the calendar
  -cal.set(Calendar.SECOND, 0);
  -cal.set(Calendar.MINUTE, minutes);
  -cal.set(Calendar.HOUR, hour);
   cal.set(Calendar.YEAR, year);
   cal.set(Calendar.DATE, day);
   cal.set(Calendar.MONTH, month);
  @@ -114,8 +113,24 @@
   if (P.equals(ampm))
   {
   ap = Calendar.PM;
  +if (hour != 12) {
  + hour += 12;
  +}
  +} else if (hour == 12) {
  + hour = 0;
   }
  -cal.set(Calendar.AM_PM, ap);
  +
  +cal.set(Calendar.SECOND, 0);
  +cal.set(Calendar.MINUTE, minutes);
  +
  +// Using Calendar.HOUR_OF_DAY instead of Calendar.HOUR  
 
  +// since the latter has proven to be unreliable.
  +// see bug 27085
  +
  +//  cal.set(Calendar.AM_PM, ap);
  +cal.set(Calendar.HOUR_OF_DAY, hour);
  +
  +cal.getTimeInMillis();
   f.setTimestamp(cal);
   
   if (DIR.equals(dirString))
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser NTFTPEntryParser.java

2004-01-21 Thread scohen
scohen  2004/01/21 11:59:31

  Modified:net/src/java/org/apache/commons/net/ftp/parser Tag:
NET_1_1_1_FINAL NTFTPEntryParser.java
  Log:
  Make the same change that was made in revision 1.10 in this file to fix bug
  20259 for the 1.1.1 release.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.7.2.1   +2 -2  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
  
  Index: NTFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- NTFTPEntryParser.java 2 Jan 2004 03:39:05 -   1.7
  +++ NTFTPEntryParser.java 21 Jan 2004 19:59:31 -  1.7.2.1
  @@ -79,7 +79,7 @@
   + ([0-5]\\d)\\s* 
   + ([AP])M\\s* 
   + (DIR)?\\s* 
  -+ ([0-9]+)?\\s* 
  ++ ([0-9]+)?\\s+ 
   + (\\S.*);
   
   /**
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/xdocs changes.xml

2004-01-21 Thread scohen
scohen  2004/01/21 14:17:19

  Modified:net  Tag: NET_1_1_1_FINAL LICENSE.txt project.xml
   net/xdocs Tag: NET_1_1_1_FINAL changes.xml
  Log:
  updated copyright date in LICENSE.txt, updated version number in project.xml,
  updated release notes in changes.txt.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.2.2.1   +1 -1  jakarta-commons/net/LICENSE.txt
  
  Index: LICENSE.txt
  ===
  RCS file: /home/cvs/jakarta-commons/net/LICENSE.txt,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- LICENSE.txt   26 Jan 2003 00:21:40 -  1.2
  +++ LICENSE.txt   21 Jan 2004 22:17:19 -  1.2.2.1
  @@ -3,7 +3,7 @@
   /* 
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2004 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.36.2.1  +1 -1  jakarta-commons/net/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/project.xml,v
  retrieving revision 1.36
  retrieving revision 1.36.2.1
  diff -u -r1.36 -r1.36.2.1
  --- project.xml   1 Jan 2004 17:33:03 -   1.36
  +++ project.xml   21 Jan 2004 22:17:19 -  1.36.2.1
  @@ -4,7 +4,7 @@
 pomVersion3/pomVersion
 nameJakarta Commons/Net/name
 idcommons-net/id
  -  currentVersion1.2.0-dev/currentVersion
  +  currentVersion1.1.1/currentVersion
 organization
   nameApache Software Foundation/name
   urlhttp://jakarta.apache.org//url
  
  
  
  No   revision
  No   revision
  1.17.2.1  +10 -0 jakarta-commons/net/xdocs/changes.xml
  
  Index: changes.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/xdocs/changes.xml,v
  retrieving revision 1.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- changes.xml   23 Oct 2003 03:58:27 -  1.17
  +++ changes.xml   21 Jan 2004 22:17:19 -  1.17.2.1
  @@ -8,6 +8,16 @@
 body
   release version=1.2.0-dev date=In CVS
   /release
  +release version=1.1.1 date=TBD
  +  action dev=scohen type=fix
  +Removed all JDK 1.1 incompatibilities that had been introduced
  +unintentionally in previous versions.  Release 1.1.1 is the last 
  +JDK 1.1 compatible release.  Any future 1.1.x maintenance releases
  +will remain JDK !.1 compatible, but version 1.2 may break
  +compatibility and will be guaranteed to work with only J2SE 1.2
  +and later. Also fixed bug with NTFTPEntryParser (20259).  
  +  /action
  +/release
   release version=1.1.0 date=October 23, 2003
 action dev=dfs type=add
   Rory Winston lt;[EMAIL PROTECTED]gt; provided
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser VMSFTPEntryParser.java VMSVersioningFTPEntryParser.java

2004-01-15 Thread scohen
scohen  2004/01/15 18:15:37

  Modified:net/src/java/org/apache/commons/net/ftp
DefaultFTPFileListParser.java FTPClient.java
FTPFileEntryParser.java FTPFileListParserImpl.java
   net/src/java/org/apache/commons/net/ftp/parser
VMSFTPEntryParser.java
VMSVersioningFTPEntryParser.java
  Log:
  remove unnecessary import statements
  
  Revision  ChangesPath
  1.10  +0 -7  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/DefaultFTPFileListParser.java
  
  Index: DefaultFTPFileListParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/DefaultFTPFileListParser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultFTPFileListParser.java 6 Jan 2004 19:53:58 -   1.9
  +++ DefaultFTPFileListParser.java 16 Jan 2004 02:15:37 -  1.10
  @@ -54,13 +54,6 @@
* http://www.apache.org/.
*/
   
  -import java.io.BufferedReader;
  -import java.io.IOException;
  -import java.io.InputStream;
  -import java.io.InputStreamReader;
  -import java.util.Calendar;
  -import java.util.Vector;
  -
   import org.apache.commons.net.ftp.parser.UnixFTPEntryParser;
   
   /**
  
  
  
  1.28  +0 -1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- FTPClient.java10 Jan 2004 23:19:51 -  1.27
  +++ FTPClient.java16 Jan 2004 02:15:37 -  1.28
  @@ -71,7 +71,6 @@
   import org.apache.commons.net.MalformedServerReplyException;
   import org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory;
   import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
  -import org.apache.commons.net.ftp.parser.ParserInitializationException;
   
   /***
* FTPClient encapsulates all the functionality necessary to store and
  
  
  
  1.15  +1 -2  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
  
  Index: FTPFileEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FTPFileEntryParser.java   10 Jan 2004 23:19:52 -  1.14
  +++ FTPFileEntryParser.java   16 Jan 2004 02:15:37 -  1.15
  @@ -56,7 +56,6 @@
   
   import java.io.BufferedReader;
   import java.io.IOException;
  -import java.io.InputStream;
   
   /**
* FTPFileEntryParser defines the interface for parsing a single FTP file
  
  
  
  1.11  +0 -10 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileListParserImpl.java
  
  Index: FTPFileListParserImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileListParserImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FTPFileListParserImpl.java12 Jan 2004 15:57:23 -  1.10
  +++ FTPFileListParserImpl.java16 Jan 2004 02:15:37 -  1.11
  @@ -54,16 +54,6 @@
* http://www.apache.org/.
*/
   
  -import java.io.InputStream;
  -import java.io.BufferedReader;
  -import java.io.IOException;
  -
  -import org.apache.oro.text.regex.Pattern;
  -import org.apache.oro.text.regex.MalformedPatternException;
  -import org.apache.oro.text.regex.PatternMatcher;
  -import org.apache.oro.text.regex.Perl5Matcher;
  -import org.apache.oro.text.regex.Perl5Compiler;
  -import org.apache.oro.text.regex.MatchResult;
   
   /**
* This abstract class implements both the older FTPFileListParser and
  
  
  
  1.17  +4 -13 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java
  
  Index: VMSFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- VMSFTPEntryParser.java10 Jan 2004 23:38:21 -  1.16
  +++ VMSFTPEntryParser.java16 Jan 2004 02:15:37 -  1.17
  @@ -54,24 +54,15 @@
* http://www.apache.org/.
*/
   
  -import java.util.Calendar;
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  -import java.util.StringTokenizer;
   import java.io.BufferedReader;
  -import java.io.ByteArrayInputStream;
   import java.io.IOException;
   import

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser VMSFTPEntryParserTest.java

2004-01-10 Thread scohen
scohen  2004/01/10 07:36:41

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
FTPFileEntryParser.java FTPFileIterator.java
FTPFileList.java FTPFileListParserImpl.java
   net/src/java/org/apache/commons/net/ftp/parser
VMSFTPEntryParser.java
   net/src/test/org/apache/commons/net/ftp/parser
VMSFTPEntryParserTest.java
  Added:   net/src/java/org/apache/commons/net/ftp/parser
VMSVersioningFTPEntryParser.java
  Log:
  Solve the VMSVersioning problem a different way.  Created new subclass of 
VMSFTPEntryParser, VMSVersioningFTPEntryParser, and rollback many other changes of the 
last few days which no longer were necessary.  This implementation is a much simpler 
solution to this problem and will allow for the smooth removal of the deprecated 
FTPFileListParser interface in 2.0.
  
  Revision  ChangesPath
  1.26  +3 -3  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- FTPClient.java9 Jan 2004 09:07:03 -   1.25
  +++ FTPClient.java10 Jan 2004 15:36:40 -  1.26
  @@ -2268,7 +2268,7 @@
*FTPClient f=FTPClient();
*f.connect(server);
*f.login(username, password);
  - *FTPFileList list = createFTPFileList(directory, parser);
  + *FTPFileList list = f.createFileList(directory, parser);
*FTPFileIterator iter = list.iterator();
* 
*while (iter.hasNext()) {
  @@ -2333,13 +2333,13 @@
   return null;
   }
   
  -FTPFileList list =
  -parser.createFTPFileList(socket.getInputStream());
  +FTPFileList list = FTPFileList.create(socket.getInputStream(), parser);
   
   socket.close();
   
   completePendingCommand();
   
  +//return parser.removeDuplicates(list);
   return list;
   }
   
  
  
  
  1.13  +14 -13
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
  
  Index: FTPFileEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- FTPFileEntryParser.java   9 Jan 2004 09:07:03 -   1.12
  +++ FTPFileEntryParser.java   10 Jan 2004 15:36:40 -  1.13
  @@ -80,7 +80,7 @@
*FTPClient f=FTPClient();
*f.connect(server);
*f.login(username, password);
  - *FTPFileList list = createFTPFileList(directory, parser);
  + *FTPFileList list = f.createFileList(directory, parser);
*FTPFileIterator iter = list.iterator();
* 
*while (iter.hasNext()) {
  @@ -162,20 +162,21 @@
*/
   String readNextEntry(BufferedReader reader) throws IOException;
   
  +
   /**
  - * Creates an codeFTPFileList/code object from a stream containing
  - * a file listing.
  - *
  - * @param stream The input stream created by reading the socket on which 
  - * the output of the LIST command was returned
  + * This method is a hook for those implementers (such as 
  + * VMSVersioningFTPEntryParser, and possibly others) which return
  + * multiple files with the same name to remove the duplicates.
* 
  - * @return the codeFTPFileList/code created.
  - * Will be null if the listing cannot be read from the stream.
  - * @exception IOException
  - *   Thrown on any failure to read from the stream.
  + * Implementations for systems that do not allow duplicates will
  + * implement a NO-OP here.
  + * 
  + * @param original Original list which may contain duplicates
  + * 
  + * @return Original list purged of duplicates
*/
  -public FTPFileList createFTPFileList(InputStream stream)
  -throws IOException;
  +FTPFileList removeDuplicates(FTPFileList original);
  +
   
   }
   
  
  
  
  1.8   +225 -11   
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileIterator.java
  
  Index: FTPFileIterator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileIterator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FTPFileIterator.java  9 Jan 2004 09:07:03 -   1.7
  +++ FTPFileIterator.java  10 Jan 2004 15:36:40 -  1.8
  @@ -57,7 +57,6 @@
   import java.util.Vector

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp DefaultFTPFileIterator.java DefaultFTPFileList.java

2004-01-10 Thread scohen
scohen  2004/01/10 07:42:16

  Removed: net/src/java/org/apache/commons/net/ftp
DefaultFTPFileIterator.java DefaultFTPFileList.java
  Log:
  removal of recently added files no longer needed because of most recent 
simplification.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParser.java NTFTPEntryParser.java OS2FTPEntryParser.java UnixFTPEntryParser.java VMSFTPEntryParser.java VMSVersioningFTPEntryParser.java

2004-01-10 Thread scohen
scohen  2004/01/10 08:01:49

  Modified:net/src/java/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParser.java
NTFTPEntryParser.java OS2FTPEntryParser.java
UnixFTPEntryParser.java VMSFTPEntryParser.java
VMSVersioningFTPEntryParser.java
  Added:   net/src/java/org/apache/commons/net/ftp
FTPFileEntryParserImpl.java
  Removed: net/src/java/org/apache/commons/net/ftp
FTPFileListParserImpl.java
  Log:
  Refactor - renamed FTPFileListParserImpl to FTPFileEntryParserImpl to get ready
  for the eventual removal of FTPFileListParser in 2.0.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
  
  Index: FTPFileEntryParserImpl.java
  ===
  package org.apache.commons.net.ftp;
  
  /* 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2004 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *if any, must include the following acknowledgment:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowledgment may appear in the software itself,
   *if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names Apache and Apache Software Foundation and
   *Apache Commons must not be used to endorse or promote products
   *derived from this software without prior written permission. For
   *written permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache,
   *nor may Apache appear in their name, without
   *prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   */
  
  import java.io.InputStream;
  import java.io.BufferedReader;
  import java.io.IOException;
  
  import java.util.ListIterator;
  
  import org.apache.oro.text.regex.Pattern;
  import org.apache.oro.text.regex.MalformedPatternException;
  import org.apache.oro.text.regex.PatternMatcher;
  import org.apache.oro.text.regex.Perl5Matcher;
  import org.apache.oro.text.regex.Perl5Compiler;
  import org.apache.oro.text.regex.MatchResult;
  
  /**
   * This abstract class implements both the older FTPFileListParser and
   * newer FTPFileEntryParser interfaces with default functionality.
   * All the classes in the parser subpackage inherit from this.
   * 
   * @author Steve Cohen [EMAIL PROTECTED]
   */
  public abstract class FTPFileEntryParserImpl 
  implements FTPFileEntryParser, FTPFileListParser
  {
  /**
   * internal pattern the matcher tries to match, representing a file 
   * entry
   */
  private Pattern pattern = null;
  
  /**
   * internal match result used by the parser
   */
  private MatchResult result = null;
  
  /**
   * Internal PatternMatcher object used by the parser.  It has protected
   * scope in case subclasses want to make use of it for their own purposes

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser VMSVersioningFTPEntryParser.java

2004-01-10 Thread scohen
scohen  2004/01/10 15:19:52

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
FTPFileEntryParser.java FTPFileEntryParserImpl.java
FTPFileList.java
   net/src/java/org/apache/commons/net/ftp/parser
VMSVersioningFTPEntryParser.java
  Log:
  Rename FTPFileEntryParser.removeDuplicates() to preParse() to allow more generic
  uses.
  
  Revision  ChangesPath
  1.27  +0 -2  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- FTPClient.java10 Jan 2004 15:36:40 -  1.26
  +++ FTPClient.java10 Jan 2004 23:19:51 -  1.27
  @@ -2338,8 +2338,6 @@
   socket.close();
   
   completePendingCommand();
  -
  -//return parser.removeDuplicates(list);
   return list;
   }
   
  
  
  
  1.14  +8 -8  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
  
  Index: FTPFileEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FTPFileEntryParser.java   10 Jan 2004 15:36:40 -  1.13
  +++ FTPFileEntryParser.java   10 Jan 2004 23:19:52 -  1.14
  @@ -164,18 +164,18 @@
   
   
   /**
  - * This method is a hook for those implementers (such as 
  - * VMSVersioningFTPEntryParser, and possibly others) which return
  - * multiple files with the same name to remove the duplicates.
  + * This method is a hook for those implementors (such as
  + * VMSVersioningFTPEntryParser, and possibly others) which need to
  + * perform some action upon the FTPFileList after it has been created
  + * from the server stream, but before any clients see the list.
* 
  - * Implementations for systems that do not allow duplicates will
  - * implement a NO-OP here.
  + * The default implementation can be a no-op.
* 
  - * @param original Original list which may contain duplicates
  + * @param original Original list after it has been created from the server 
stream
* 
  - * @return Original list purged of duplicates
  + * @return Original list as processed by this method.
*/
  -FTPFileList removeDuplicates(FTPFileList original);
  +FTPFileList preParse(FTPFileList original);
   
   
   }
  
  
  
  1.2   +13 -11
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
  
  Index: FTPFileEntryParserImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FTPFileEntryParserImpl.java   10 Jan 2004 16:01:48 -  1.1
  +++ FTPFileEntryParserImpl.java   10 Jan 2004 23:19:52 -  1.2
  @@ -230,20 +230,22 @@
   return reader.readLine();
   }
   /**
  - * Implement hook provided for those implementers (such as
  - * VMSVersioningFTPEntryParser, and possibly others) which return
  - * multiple files with the same name to remove the duplicates by
  - * defining a no-op method which simply returns the original
  - * FTPFileList.  This method should not be overridden except in 
  - * parsers that really have to remove duplicates.
  + * This method is a hook for those implementors (such as
  + * VMSVersioningFTPEntryParser, and possibly others) which need to
  + * perform some action upon the FTPFileList after it has been created
  + * from the server stream, but before any clients see the list.
*
  - * @param original Original list 
  + * This default implementation is a no-op.
*
  - * @return Original list
  + * @param original Original list after it has been created from the server 
stream
  + *
  + * @return codeoriginal/code unmodified.
*/
  -public FTPFileList removeDuplicates(FTPFileList original) {
  -return original;
  -}
  + public FTPFileList preParse(FTPFileList original) { 
  + return original;
  + } 
  +  
  +
   
   /**
* return a ListIterator to the internal Vector of lines of codelist/code, 
  
  
  
  1.9   +1 -1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileList.java
  
  Index: FTPFileList.java

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPFileListParserImpl.java

2004-01-10 Thread scohen
scohen  2004/01/10 19:38:48

  Added:   net/src/java/org/apache/commons/net/ftp Tag: 1.9
FTPFileListParserImpl.java
  Log:
  Add this class back in as jakarta rules prohibit it's deletion at this time.
  It is now deprecated and unused by any code in this library.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.9   +14 -33
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileListParserImpl.java
  
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser DefaultFTPFileEntryParserFactory.java ParserInitializationException.java

2004-01-05 Thread scohen
scohen  2004/01/05 14:11:12

  Modified:net/src/java/org/apache/commons/net/ftp
DefaultFTPFileListParser.java FTPClient.java
   net/src/java/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactory.java
ParserInitializationException.java
  Log:
  Cleanup of File parsing interface:
  Deprecate class DefaultFTPFileListParser
  Remove __defaultFileListParser from FTPClient
  Deprecate FTPClient.listFiles() methods that take a FTPFileListParser param
  For those FTPClient.listFiles() methods that do not take a FTPFileListParser
  param, reimplement as per previous FTPClient.getFileList() methods
  Remove FTPClient.getFileList methods
  Change ParserInitializationException to inherit from RuntimeException
  Add FTPFileEntryParserFactory member to FTPClient and initialize this
  member to a new DefaultFTPFileEntryParserFactory.  Add a set() method
  for this member.  Remove logic that attempts to initialize this member
  based on a system property.
  
  Revision  ChangesPath
  1.8   +4 -3  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/DefaultFTPFileListParser.java
  
  Index: DefaultFTPFileListParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/DefaultFTPFileListParser.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultFTPFileListParser.java 2 Jan 2004 03:39:04 -   1.7
  +++ DefaultFTPFileListParser.java 5 Jan 2004 22:11:12 -   1.8
  @@ -61,7 +61,7 @@
   import java.util.Calendar;
   import java.util.Vector;
   
  -/***
  +/**
* DefaultFTPFileListParser is the default implementation of
* a href=org.apache.commons.net.ftp.FTPFileListParser.html FTPFileListParser 
/a
* used by a href=org.apache.commons.net.ftp.FTPClient.html FTPClient /a
  @@ -75,8 +75,9 @@
* @see FTPFileListParser
* @see FTPFile
* @see FTPClient#listFiles
  - ***/
  -
  + * @see org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
  + * @deprecated use autodetect mechanism in DefaultFTPFileEntryParserFactory instead
  + */
   public final class DefaultFTPFileListParser implements FTPFileListParser
   {
   
  
  
  
  1.21  +219 -242  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FTPClient.java3 Jan 2004 22:15:23 -   1.20
  +++ FTPClient.java5 Jan 2004 22:11:12 -   1.21
  @@ -69,6 +69,7 @@
   import org.apache.commons.net.io.ToNetASCIIOutputStream;
   import org.apache.commons.net.io.Util;
   import org.apache.commons.net.MalformedServerReplyException;
  +import org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory;
   import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
   import org.apache.commons.net.ftp.parser.ParserInitializationException;
   
  @@ -205,7 +206,9 @@
* @author Daniel F. Savarese
* @see FTP
* @see FTPConnectionClosedException
  - * @see DefaultFTPFileListParser
  + * @see FTPFileEntryParser
  + * @see FTPFileEntryParserFactory
  + * @see DefaultFTPFileEntryParserFactory
* @see org.apache.commons.net.MalformedServerReplyException
***/
   
  @@ -247,8 +250,8 @@
   private String __passiveHost;
   private int __fileType, __fileFormat, __fileStructure, __fileTransferMode;
   private boolean __remoteVerificationEnabled;
  -private FTPFileListParser __fileListParser;
   private long __restartOffset;
  +private FTPFileEntryParserFactory parserFactory;
   
   /***
* Default FTPClient constructor.  Creates a new FTPClient instance
  @@ -262,9 +265,9 @@
   public FTPClient()
   {
   __initDefaults();
  -__fileListParser = new DefaultFTPFileListParser();
   __dataTimeout = -1;
   __remoteVerificationEnabled = true;
  +parserFactory = new DefaultFTPFileEntryParserFactory();
   }
   
   
  @@ -524,6 +527,19 @@
   __dataTimeout = timeout;
   }
   
  +/**
  + * set the factory used for parser creation to the supplied factory object.
  + * 
  + * @param parserFactory
  + *   factory object used to create FTPFileEntryParsers
  + * 
  + * @see org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory
  + * @see org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
  + */
  +public void setParserFactory(FTPFileEntryParserFactory parserFactory) {
  +this.parserFactory = parserFactory;
  +}
  +
   
   /***
* Closes the connection to the FTP server

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPFileEntryParser.java

2004-01-05 Thread scohen
scohen  2004/01/05 14:29:21

  Modified:net/src/java/org/apache/commons/net/ftp
FTPFileEntryParser.java
  Log:
  Change documentation to reflect previous FTPClient changes
  
  Revision  ChangesPath
  1.9   +13 -11
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
  
  Index: FTPFileEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FTPFileEntryParser.java   3 Jan 2004 17:55:22 -   1.8
  +++ FTPFileEntryParser.java   5 Jan 2004 22:29:21 -   1.9
  @@ -89,19 +89,20 @@
*}
* /pre
* 
  - * The second example uses the newer codeFTPClient.getFileList()/code
  - * API to pull the whole list from the codesubfolder/codein one call, 
  - * attempting to automatically detect the parser type.  The null parameter
  - * indicates that autodection should be used.
  + * The second example uses the revised codeFTPClient.listFiles()/code
  + * API to pull the whole list from the subfolder codesubfolder/code in 
  + * one call, attempting to automatically detect the parser type.  This 
  + * method, without a parserKey parameter, indicates that autodection should 
  + * be used.
* 
* pre
*FTPClient f=FTPClient();
*f.connect(server);
*f.login(username, password);
  - *FTPFile[] files = f.getFileList(null, subfolder);
  + *FTPFile[] files = f.listFiles(subfolder);
* /pre
* 
  - * The third example uses the newer codeFTPClient.getFileList()/code
  + * The third example uses the revised codeFTPClient.listFiles()/code
* API to pull the whole list from the current working directory in one call, 
* but specifying by classname the parser to be used.  For this particular
* parser class, this approach is necessary since there is no way to 
  @@ -111,11 +112,12 @@
*FTPClient f=FTPClient();
*f.connect(server);
*f.login(username, password);
  - *FTPFile[] files = f.getFileList(
  - *  org.apache.commons.net.ftp.parser.EnterpriseUnixFTPFileEntryParser);
  + *FTPFile[] files = f.listFiles(
  + *  org.apache.commons.net.ftp.parser.EnterpriseUnixFTPFileEntryParser, 
  + *  .);
* /pre
*
  - * The fourth example uses the newer codeFTPClient.getFileList()/code
  + * The fourth example uses the revised codeFTPClient.listFiles()/code
* API to pull a single file listing in an arbitrary directory in one call, 
* specifying by KEY the parser to be used, in this case, VMS.  
* 
  @@ -123,7 +125,7 @@
*FTPClient f=FTPClient();
*f.connect(server);
*f.login(username, password);
  - *FTPFile[] files = f.getFileList(VMS, subfolder/foo.java);
  + *FTPFile[] files = f.listFiles(VMS, subfolder/foo.java);
* /pre
*
* @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java

2004-01-03 Thread scohen
scohen  2004/01/03 05:49:12

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
  Log:
  Enhance FTPClient.getFileList by implementing autodetection.  A null parserKey param 
causes autodetection of parser type.
  
  Revision  ChangesPath
  1.19  +48 -18
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FTPClient.java2 Jan 2004 22:16:41 -   1.18
  +++ FTPClient.java3 Jan 2004 13:49:11 -   1.19
  @@ -2215,35 +2215,48 @@
   return null;
   }
   /**
  - * Using the supplied key, and the pluggable parser factory defined by
  - * the system property codeftp.entry.parser.factory/code obtain a list
  - * of file information for the current working directory or for just a 
  + * Using the supplied codeparserKey/code, and the pluggable parser
  + * factory defined by the system property
  + * codeftp.entry.parser.factory/code, obtain a list
  + * of file information for the current working directory or for just a
* single file.
* p
  - * Under the DefaultFTPFileEntryParserFactory, which is used unless a 
  - * different factory has been specified in the system properties, the key 
  - * can be either a recognized System type for which a parser has been 
  + * If codekey/code is null, this object will try to autodetect
  + * the system-type/parser-type by calling the SYST command.
  + * p
  + * Under the DefaultFTPFileEntryParserFactory, which is used unless a
  + * different factory has been specified in the system properties, the key
  + * can be either a recognized System type for which a parser has been
* defined, or the fully qualified class name of a class that implements
* org.apache.commons.net.ftp.FTPFileEntryParser.
* p
* This information is obtained through the LIST command.  The contents of
  - * the returned array is determined by thecode FTPFileEntryParser /code 
  + * the returned array is determined by thecode FTPFileEntryParser /code
* used.
* p
  - * Since the server may or may not expand glob expressions, using them 
  + * Since the server may or may not expand glob expressions, using them
* is not recommended and may well cause this method to fail.
* p
* 
* @param parserKey This is a handle which the parser factory used
*  must be able to resolve into a class implementing
*  FTPFileEntryParser.
  - *  
  + *  p
*  In the DefaultFTPFileEntryParserFactory, this
*  may either be a specific key identifying a server type,
*  which is used to identify a parser type,
*  or the fully qualified class name of the parser.  See
*  DefaultFTPFileEntryParserFactory.createFileEntryParser
*  for full details.
  + *  p
  + *  If this parameter is null, will attempt to generate a key
  + *  by running the SYST command.  This should cause no problem
  + *  with the functionality implemented in the
  + *  DefaultFTPFileEntryParserFactory, but may not map so well
  + *  to an alternative user-created factory.  If that is the
  + *  case, calling this routine with a null parameter and a
  + *  custom parser factory may not be advisable.
  + *  p
* @param pathname  The file or directory to list.
* 
* @return The list of file information contained in the given path in
  @@ -2288,6 +2301,12 @@
   Unable to instantiate parser factory, e);
   }
   
  +// if a null parserKey is supplied, autodetect by calling
  +// the SYST command and use that to choose the parser.
  +if (null == parserKey) {
  +parserKey = getSystemName();
  +}
  +
   FTPFileEntryParser parser = 
   factory.createFileEntryParser(parserKey);
   FTPFileList list = createFileList(pathname, parser);
  @@ -2296,33 +2315,44 @@
   
   
   /**
  - * Using the supplied key, and the pluggable parser factory defined by
  - * the system property codeftp.entry.parser.factory/code, obtain a 
  + * Using the supplied codeparserKey/code, and the pluggable parser 
  + * factory defined by the system property 
  + * codeftp.entry.parser.factory/code, obtain a
* list of file

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java

2004-01-03 Thread scohen
scohen  2004/01/03 14:15:23

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
  Log:
  fix param in one-arg getFileList()
  
  Revision  ChangesPath
  1.20  +1 -1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- FTPClient.java3 Jan 2004 13:49:11 -   1.19
  +++ FTPClient.java3 Jan 2004 22:15:23 -   1.20
  @@ -2384,6 +2384,6 @@
   public FTPFile[] getFileList(String parserKey) 
   throws IOException, ParserInitializationException
   {
  -return getFileList(parserKey, );
  +return getFileList(parserKey, .);
   }
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser DefaultFTPFileEntryParserFactoryTest.java

2004-01-02 Thread scohen
scohen  2004/01/02 14:16:41

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
  Added:   net/src/java/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactory.java
FTPFileEntryParserFactory.java
ParserInitializationException.java
   net/src/test/org/apache/commons/net/ftp/parser
DefaultFTPFileEntryParserFactoryTest.java
  Log:
  Implementation of a Parser Factory for creating FTPFileEntryParser entries.
  
  Revision  ChangesPath
  1.18  +142 -0
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- FTPClient.java2 Jan 2004 03:39:04 -   1.17
  +++ FTPClient.java2 Jan 2004 22:16:41 -   1.18
  @@ -69,6 +69,8 @@
   import org.apache.commons.net.io.ToNetASCIIOutputStream;
   import org.apache.commons.net.io.Util;
   import org.apache.commons.net.MalformedServerReplyException;
  +import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
  +import org.apache.commons.net.ftp.parser.ParserInitializationException;
   
   /***
* FTPClient encapsulates all the functionality necessary to store and
  @@ -2212,6 +2214,146 @@
   return getReplyString();
   return null;
   }
  +/**
  + * Using the supplied key, and the pluggable parser factory defined by
  + * the system property codeftp.entry.parser.factory/code obtain a list
  + * of file information for the current working directory or for just a 
  + * single file.
  + * p
  + * Under the DefaultFTPFileEntryParserFactory, which is used unless a 
  + * different factory has been specified in the system properties, the key 
  + * can be either a recognized System type for which a parser has been 
  + * defined, or the fully qualified class name of a class that implements
  + * org.apache.commons.net.ftp.FTPFileEntryParser.
  + * p
  + * This information is obtained through the LIST command.  The contents of
  + * the returned array is determined by thecode FTPFileEntryParser /code 
  + * used.
  + * p
  + * Since the server may or may not expand glob expressions, using them 
  + * is not recommended and may well cause this method to fail.
  + * p
  + * 
  + * @param parserKey This is a handle which the parser factory used
  + *  must be able to resolve into a class implementing
  + *  FTPFileEntryParser.
  + *  
  + *  In the DefaultFTPFileEntryParserFactory, this
  + *  may either be a specific key identifying a server type,
  + *  which is used to identify a parser type,
  + *  or the fully qualified class name of the parser.  See
  + *  DefaultFTPFileEntryParserFactory.createFileEntryParser
  + *  for full details.
  + * @param pathname  The file or directory to list.
  + * 
  + * @return The list of file information contained in the given path in
  + * the format determined by the parser represented by the
  + * code parserKey /code parameter.
  + * @exception FTPConnectionClosedException
  + *   If the FTP server prematurely closes the connection
  + *   as a result of the client being idle or some other
  + *   reason causing the server to send FTP reply code 421.
  + *   This exception may be caught either as an IOException
  + *   or independently as itself.
  + * @exception IOException
  + *   If an I/O error occurs while either sending a
  + *   command to the server or receiving a reply
  + *   from the server.
  + * @exception ParserInitializationException
  + *   Thrown if the parserKey parameter cannot be
  + *   resolved by the selected parser factory.
  + *   In the DefaultFTPEntryParserFactory, this will
  + *   happen when parserKey is neither
  + *   the fully qualified class name of a class
  + *   implementing the interface
  + *   org.apache.commons.net.ftp.FTPFileEntryParser
  + *   nor a string containing one of the recognized keys
  + *   mapping to such a parser or if class loader
  + *   security issues prevent its being loaded.
  + * @see

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser VMSFTPEntryParser.java

2004-01-01 Thread scohen
scohen  2004/01/01 12:49:49

  Modified:net/src/java/examples ExtendedNNTPOps.java
   net/src/java/org/apache/commons/net/ftp/parser
VMSFTPEntryParser.java
  Log:
  refactor back to JDK 1.1 compatibility.
  HashMap - Hashtable
  ArrayList - [] or use StringTokenizer to avoid having to fall back to deprecated 
methods in ORO.
  
  Revision  ChangesPath
  1.3   +8 -5  jakarta-commons/net/src/java/examples/ExtendedNNTPOps.java
  
  Index: ExtendedNNTPOps.java
  ===
  RCS file: /home/cvs/jakarta-commons/net/src/java/examples/ExtendedNNTPOps.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExtendedNNTPOps.java  23 Sep 2003 02:53:56 -  1.2
  +++ ExtendedNNTPOps.java  1 Jan 2004 20:49:48 -   1.3
  @@ -58,7 +58,6 @@
   import java.io.IOException;
   import java.io.Reader;
   import java.io.PrintWriter;
  -import java.util.ArrayList;
   import java.util.StringTokenizer;
   
   import org.apache.commons.net.io.DotTerminatedMessageReader;
  @@ -143,9 +142,8 @@
int highArticleNumber)
   throws IOException 
   {
  -ArrayList articles = new ArrayList();
   Reader reader = null;
  -
  +Article[] articles = new Article[0];
   reader = (DotTerminatedMessageReader)
   client.retrieveArticleInfo(lowArticleNumber, highArticleNumber);
   
  @@ -156,6 +154,11 @@
   // Extract the article information
   // Mandatory format (from NNTP RFC 2980) is :
   // Subject\tAuthor\tDate\tID\tReference(s)\tByte Count\tLine Count
  +
  +int count = st.countTokens();
  +articles = new Article[count];
  +int index = 0;
  +
   while (st.hasMoreTokens()) {
   StringTokenizer stt = new StringTokenizer(st.nextToken(), \t);
   Article article = new Article();
  @@ -165,13 +168,13 @@
   article.setDate(stt.nextToken());
   article.setArticleId(stt.nextToken());
   article.addHeaderField(References, stt.nextToken());
  -articles.add(article);
  +articles[index++] = article;
   }
   } else {
   return null;
   }

  -return (Article[]) articles.toArray(new Article[articles.size()]);
  +return articles;
   }

   private String readerToString(Reader reader) 
  
  
  
  1.9   +18 -14
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java
  
  Index: VMSFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- VMSFTPEntryParser.java30 Dec 2003 03:58:52 -  1.8
  +++ VMSFTPEntryParser.java1 Jan 2004 20:49:48 -   1.9
  @@ -3,7 +3,7 @@
   /* 
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2004 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -55,8 +55,9 @@
*/
   
   import java.util.Calendar;
  -import java.util.HashMap;
  -import java.util.ArrayList;
  +import java.util.Enumeration;
  +import java.util.Hashtable;
  +import java.util.StringTokenizer;
   import java.io.BufferedReader;
   import java.io.ByteArrayInputStream;
   import java.io.IOException;
  @@ -209,7 +210,7 @@
   files = super.parseFileList(listingStream);
   } else {
   FTPFile[] tempFiles = super.parseFileList(listingStream);
  -HashMap filesHash = new HashMap();
  +Hashtable filesHash = new Hashtable();
   String fileName;
   
   for (int index = 0; index  tempFiles.length; index++) {
  @@ -218,8 +219,14 @@
   filesHash.put(fileName, (FTPFile) tempFiles[index]);
   }
   }
  +files = new FTPFile[filesHash.size()];
  +Enumeration e = filesHash.keys();
  +int index = 0;
  +while (e.hasMoreElements()) {
  +FTPFile ftpf = (FTPFile) filesHash.get(e.nextElement());
  +files[index++] = ftpf;
  +}
   
  -files = (FTPFile[]) filesHash.values().toArray(new FTPFile[0]);
   }
   
   return files;
  @@ -256,18 +263,15 @@
   String owner = group(9);
   String grp;
   String user

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParserTest.java FTPParseTestFramework.java NTFTPEntryParserTest.java OS2FTPEntryParserTest.java UnixFTPEntryParserTest.java VMSFTPEntryParserTest.java

2004-01-01 Thread scohen
scohen  2004/01/01 13:04:22

  Modified:net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2
FTPClient2.java FTPFileEntryParser.java
FTPFileIterator.java FTPFileList.java
   net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/parser
AIXFTPEntryParser.java
EnterpriseUnixFTPEntryParser.java
MatchApparatus.java NTFTPEntryParser.java
OS2FTPEntryParser.java UnixFTPEntryParser.java
VMSFTPEntryParser.java
   net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser
EnterpriseUnixFTPEntryParserTest.java
FTPParseTestFramework.java
NTFTPEntryParserTest.java
OS2FTPEntryParserTest.java
UnixFTPEntryParserTest.java
VMSFTPEntryParserTest.java
   net/src/java/examples IOUtil.java PrintCommandListener.java
chargen.java daytime.java echo.java finger.java
ftp.java fwhois.java mail.java messages.java
newsgroups.java post.java rdate.java rexec.java
rlogin.java rshell.java server2serverFTP.java
tftp.java weatherTelnet.java
   net/src/java/org/apache/commons/net CharGenTCPClient.java
CharGenUDPClient.java DatagramSocketClient.java
DatagramSocketFactory.java DaytimeTCPClient.java
DaytimeUDPClient.java
DefaultDatagramSocketFactory.java
DefaultSocketFactory.java DiscardTCPClient.java
DiscardUDPClient.java EchoTCPClient.java
EchoUDPClient.java FingerClient.java
MalformedServerReplyException.java
ProtocolCommandEvent.java
ProtocolCommandListener.java
ProtocolCommandSupport.java SocketClient.java
SocketFactory.java TimeTCPClient.java
TimeUDPClient.java WhoisClient.java
   net/src/java/org/apache/commons/net/bsd RCommandClient.java
RExecClient.java RLoginClient.java
   net/src/java/org/apache/commons/net/ftp
DefaultFTPFileListParser.java FTP.java
FTPClient.java FTPCommand.java
FTPConnectionClosedException.java FTPFile.java
FTPFileEntryParser.java FTPFileIterator.java
FTPFileList.java FTPFileListParser.java
FTPFileListParserImpl.java FTPReply.java
   net/src/java/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParser.java
NTFTPEntryParser.java OS2FTPEntryParser.java
UnixFTPEntryParser.java
   net/src/java/org/apache/commons/net/io
CopyStreamAdapter.java CopyStreamEvent.java
CopyStreamException.java CopyStreamListener.java
DotTerminatedMessageReader.java
DotTerminatedMessageWriter.java
FromNetASCIIInputStream.java
FromNetASCIIOutputStream.java
SocketInputStream.java SocketOutputStream.java
ToNetASCIIInputStream.java
ToNetASCIIOutputStream.java Util.java
   net/src/java/org/apache/commons/net/nntp ArticlePointer.java
NNTP.java NNTPClient.java NNTPCommand.java
NNTPConnectionClosedException.java NNTPReply.java
NewGroupsOrNewsQuery.java NewsgroupInfo.java
SimpleNNTPHeader.java
   net/src/java/org/apache/commons/net/pop3 POP3.java
POP3Client.java POP3Command.java
POP3MessageInfo.java POP3Reply.java
   net/src/java/org/apache/commons/net/smtp RelayPath.java
SMTP.java SMTPClient.java SMTPCommand.java
SMTPConnectionClosedException.java SMTPReply.java
SimpleSMTPHeader.java
   net/src/java/org/apache/commons/net/telnet
TelnetCommand.java TelnetOption.java
TelnetOutputStream.java
   net/src/java/org/apache/commons/net/tftp TFTP.java
TFTPAckPacket.java TFTPClient.java
TFTPDataPacket.java TFTPErrorPacket.java
TFTPPacket.java TFTPPacketException.java
TFTPReadRequestPacket.java TFTPRequestPacket.java

cvs commit: jakarta-commons/net/src/java/examples ExtendedNNTPOps.java TelnetClientExample.java

2004-01-01 Thread scohen
scohen  2004/01/01 13:31:21

  Modified:net/src/java/examples ExtendedNNTPOps.java
TelnetClientExample.java
  Log:
  more copyright date changes
  
  Revision  ChangesPath
  1.4   +1 -1  jakarta-commons/net/src/java/examples/ExtendedNNTPOps.java
  
  Index: ExtendedNNTPOps.java
  ===
  RCS file: /home/cvs/jakarta-commons/net/src/java/examples/ExtendedNNTPOps.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExtendedNNTPOps.java  1 Jan 2004 20:49:48 -   1.3
  +++ ExtendedNNTPOps.java  1 Jan 2004 21:31:21 -   1.4
  @@ -1,7 +1,7 @@
   /* 
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2004 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.4   +1 -1  jakarta-commons/net/src/java/examples/TelnetClientExample.java
  
  Index: TelnetClientExample.java
  ===
  RCS file: /home/cvs/jakarta-commons/net/src/java/examples/TelnetClientExample.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TelnetClientExample.java  10 Aug 2003 09:22:25 -  1.3
  +++ TelnetClientExample.java  1 Jan 2004 21:31:21 -   1.4
  @@ -3,7 +3,7 @@
   /* 
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2004 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/telnet EchoOptionHandlerTest.java InvalidTelnetOptionExceptionTest.java SimpleOptionHandlerTest.java SuppressGAOptionHandlerTest.java TelnetClientFunctionalTest.java TelnetClientTest.java TelnetOptionHandlerTestAbstract.java TelnetOptionTest.java TelnetTestResponder.java TelnetTestSimpleServer.java TerminalTypeOptionHandlerTest.java

2004-01-01 Thread scohen
scohen  2004/01/01 19:39:07

  Modified:net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2
FTPClient2.java FTPFileEntryParser.java
FTPFileIterator.java FTPFileList.java
   net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/parser
AIXFTPEntryParser.java
EnterpriseUnixFTPEntryParser.java
MatchApparatus.java NTFTPEntryParser.java
OS2FTPEntryParser.java UnixFTPEntryParser.java
VMSFTPEntryParser.java
   net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser
EnterpriseUnixFTPEntryParserTest.java
FTPParseTestFramework.java
NTFTPEntryParserTest.java
OS2FTPEntryParserTest.java
UnixFTPEntryParserTest.java
VMSFTPEntryParserTest.java
   net/src/java/examples ExtendedNNTPOps.java IOUtil.java
PrintCommandListener.java TelnetClientExample.java
chargen.java daytime.java echo.java finger.java
ftp.java fwhois.java mail.java messages.java
newsgroups.java post.java rdate.java rexec.java
rlogin.java rshell.java server2serverFTP.java
tftp.java weatherTelnet.java
   net/src/java/org/apache/commons/net CharGenTCPClient.java
CharGenUDPClient.java DatagramSocketClient.java
DatagramSocketFactory.java DaytimeTCPClient.java
DaytimeUDPClient.java
DefaultDatagramSocketFactory.java
DefaultSocketFactory.java DiscardTCPClient.java
DiscardUDPClient.java EchoTCPClient.java
EchoUDPClient.java FingerClient.java
MalformedServerReplyException.java
ProtocolCommandEvent.java
ProtocolCommandListener.java
ProtocolCommandSupport.java SocketClient.java
SocketFactory.java TimeTCPClient.java
TimeUDPClient.java WhoisClient.java
   net/src/java/org/apache/commons/net/bsd RCommandClient.java
RExecClient.java RLoginClient.java
   net/src/java/org/apache/commons/net/ftp
DefaultFTPFileListParser.java FTP.java
FTPClient.java FTPCommand.java
FTPConnectionClosedException.java FTPFile.java
FTPFileEntryParser.java FTPFileIterator.java
FTPFileList.java FTPFileListParser.java
FTPFileListParserImpl.java FTPReply.java
   net/src/java/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParser.java
NTFTPEntryParser.java OS2FTPEntryParser.java
UnixFTPEntryParser.java VMSFTPEntryParser.java
   net/src/java/org/apache/commons/net/io
CopyStreamAdapter.java CopyStreamEvent.java
CopyStreamException.java CopyStreamListener.java
DotTerminatedMessageReader.java
DotTerminatedMessageWriter.java
FromNetASCIIInputStream.java
FromNetASCIIOutputStream.java
SocketInputStream.java SocketOutputStream.java
ToNetASCIIInputStream.java
ToNetASCIIOutputStream.java Util.java
   net/src/java/org/apache/commons/net/nntp ArticlePointer.java
NNTP.java NNTPClient.java NNTPCommand.java
NNTPConnectionClosedException.java NNTPReply.java
NewGroupsOrNewsQuery.java NewsgroupInfo.java
SimpleNNTPHeader.java
   net/src/java/org/apache/commons/net/pop3 POP3.java
POP3Client.java POP3Command.java
POP3MessageInfo.java POP3Reply.java
   net/src/java/org/apache/commons/net/smtp RelayPath.java
SMTP.java SMTPClient.java SMTPCommand.java
SMTPConnectionClosedException.java SMTPReply.java
SimpleSMTPHeader.java
   net/src/java/org/apache/commons/net/telnet
EchoOptionHandler.java
InvalidTelnetOptionException.java
SimpleOptionHandler.java
SuppressGAOptionHandler.java Telnet.java
TelnetClient.java TelnetCommand.java
TelnetInputStream.java

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser VMSFTPEntryParserTest.java

2003-12-29 Thread scohen
scohen  2003/12/29 17:17:04

  Modified:net/src/test/org/apache/commons/net/ftp/parser
VMSFTPEntryParserTest.java
  Log:
  fix testParseFileList() method so as not to expect listing to be in an order
  which the method being tested is not able to ensure.
  
  Revision  ChangesPath
  1.7   +21 -4 
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/VMSFTPEntryParserTest.java
  
  Index: VMSFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/VMSFTPEntryParserTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- VMSFTPEntryParserTest.java5 Aug 2003 18:56:42 -   1.6
  +++ VMSFTPEntryParserTest.java30 Dec 2003 01:17:04 -  1.7
  @@ -125,9 +125,26 @@
   VMSFTPEntryParser parser = new VMSFTPEntryParser();
   FTPFile[] files = parser.parseFileList(new 
ByteArrayInputStream(fullListing.getBytes()));
   assertEquals(3, files.length);
  -assertEquals(files[0].getName(), 2-JUN.LIS, files[0].getName());
  -assertEquals(files[1].getName(), 3-JUN.LIS, files[1].getName());
  -assertEquals(files[2].getName(), 1-JUN.LIS, files[2].getName());
  +assertFileInListing(files, 1-JUN.LIS);
  +assertFileInListing(files, 2-JUN.LIS);
  +assertFileInListing(files, 3-JUN.LIS);
  +assertFileNotInListing(files, 1-JUN.LIS;1);
  +}
  +
  +public void assertFileInListing(FTPFile[] listing, String name) {
  +for (int i = 0; i  listing.length; i++) {
  +if (name.equals(listing[i].getName())) {
  +return;
  +}
  +}
  +fail(File  + name +  not found in supplied listing);
  +}
  +public void assertFileNotInListing(FTPFile[] listing, String name) {
  +for (int i = 0; i  listing.length; i++) {
  +if (name.equals(listing[i].getName())) {
  +fail(Unexpected File  + name +  found in supplied listing);
  +}
  +}
   }
   
   /**
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParser.java NTFTPEntryParser.java OS2FTPEntryParser.java UnixFTPEntryParser.java VMSFTPEntryParser.java

2003-12-29 Thread scohen
scohen  2003/12/29 19:58:53

  Modified:net/src/java/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParser.java
NTFTPEntryParser.java OS2FTPEntryParser.java
UnixFTPEntryParser.java VMSFTPEntryParser.java
  Log:
  Remove outdated documentation on usage of the parsers and provide one central
  bit of documentation explaining this usage.
  
  Revision  ChangesPath
  1.4   +2 -1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java
  
  Index: EnterpriseUnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EnterpriseUnixFTPEntryParser.java 18 May 2003 04:03:17 -  1.3
  +++ EnterpriseUnixFTPEntryParser.java 30 Dec 2003 03:58:52 -  1.4
  @@ -64,6 +64,7 @@
*  -C--E-FTP B QUA1I1  18128   41 Aug 12 13:56 QUADTEST
* @version $Id$
* @author a href=[EMAIL PROTECTED]Winston Ojeda/a
  + * @see org.apache.commons.net.ftp.FTPFileEntryParser FTPFileEntryParser (for usage 
instructions)
*/
   public class EnterpriseUnixFTPEntryParser extends FTPFileListParserImpl
   {
  
  
  
  1.5   +4 -40 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
  
  Index: NTFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NTFTPEntryParser.java 18 May 2003 04:03:17 -  1.4
  +++ NTFTPEntryParser.java 30 Dec 2003 03:58:52 -  1.5
  @@ -59,48 +59,12 @@
   import org.apache.commons.net.ftp.FTPFileListParserImpl;
   
   /**
  - * This Class uses the ListParser class to validate the input string.
  - * It also requires the NetComponents library version 1.3.7 or later
  - * and the OROMatcher library for the regualar expressions stuff.
  - *
  - *
  - * PBUSAGE:/B/P
  - * LICreate an instance of NTListParser/LI
  - *   ddNTListParser parser = new NTListParser();
  - * LICreate an instance of FTPClient/LI
  - *   ddFTPClient FTPClientObj = new FTPClient();
  - * LIConnect to the NODE /LI
  - *   ddFTPClientObj.connect();
  - * LILogin to the NODE /LI
  - *   ddFTPClientObj.login(username,password);
  - * LISwitch directories if you have to/LI
  - *   ddFTPClientObj.changeWorkingDirectory(thePath);
  - * LIYou might want to check if you are truly in a NT System/LI
  - *   ddBString am_I_NT =  FTPClientObj.getSystemName()/B
  - *ddparse am_I_NT to find out
  - * LICall listFiles passing the newly created parser and a filename or a 
  - * mask to look for /LI
  - *   ddFTPClientObj.listFiles(parser,filename);
  - * LIYou'll get back the list as an array of FTPFiles like this
  - *   ddFTPFile[] myNTFiles = FTPClientObj.listFiles(parser,filename);  (or)
  - *ddFTPFile[] myNTFiles = FTPClientObj.listFiles(parser);
  - * P
  - * That's all there is to it.
  - * P
  - * Each FTPFile object is populated just like any other FTPFile
  - * object. The only thing not implemented at this time is the file
  - * permissions, but I can do it if there is a real need for it.
  - * P
  - * !NOTE/WARNING!:Before you pass the parser to listFiles, make sure you are in 
  - * the directory that you need to be. This parser will return the filtered
  - * files from the directory it is in. This becomes crucial specialy if your
  - * goal is to delete the output of the parser.
  - * P
  - *
  + * Implementation of FTPFileEntryParser and FTPFileListParser for NT Systems
  + * 
* @author  a href=[EMAIL PROTECTED]Winston Ojeda/a
* @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @version $Id$
  - * @see org.apache.commons.net.ftp.FTPFileListParser
  + * @see org.apache.commons.net.ftp.FTPFileEntryParser FTPFileEntryParser (for usage 
instructions)
*/
   public class NTFTPEntryParser extends FTPFileListParserImpl
   {
  
  
  
  1.4   +5 -40 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java
  
  Index: OS2FTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OS2FTPEntryParser.java6 Mar 2003 03:28:36 -   1.3
  +++ OS2FTPEntryParser.java30 Dec 2003 03:58:52 -  1.4
  @@ -59,47 +59,12 @@
   import org.apache.commons.net.ftp.FTPFileListParserImpl;
   
   /**
  - * This Class uses the ListParser class to validate the input string.
  - * It also

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPFileEntryParser.java

2003-12-29 Thread scohen
scohen  2003/12/29 20:04:11

  Modified:net/src/java/org/apache/commons/net/ftp
FTPFileEntryParser.java
  Log:
  Add central documentation on parser usage, linked from all the parser
  implemenation javadocs.
  
  Revision  ChangesPath
  1.5   +22 -3 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
  
  Index: FTPFileEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FTPFileEntryParser.java   6 Mar 2003 12:38:42 -   1.4
  +++ FTPFileEntryParser.java   30 Dec 2003 04:04:11 -  1.5
  @@ -59,12 +59,31 @@
   
   /**
* FTPFileEntryParser defines the interface for parsing a single FTP file
  - * listing and converting that information into an 
  + * listing and converting that information into an
* a href=org.apache.commons.net.ftp.FTPFile.html FTPFile /a instance.
* Sometimes you will want to parse unusual listing formats, in which
* case you would create your own implementation of FTPFileEntryParser and
* if necessary, subclass FTPFile.
  - *
  + * p
  + * Here is an example showing how to use one of the classes that
  + * implement this interface.  In the following example codeparser /code 
  + * is an object (in the package codeorg.apache.commons.net.ftp.parser/code)
  + * implementing this inteface.
  + * 
  + * pre
  + *FTPClient f=FTPClient();
  + *f.connect(server);
  + *f.login(username, password);
  + *FTPFileList list = createFTPFileList(directory, parser);
  + *FTPFileIterator iter = list.iterator();
  + * 
  + *while (iter.hasNext()) {
  + *   FTPFile[] files = iter.getNext(25);  // page size you want
  + *   //do whatever you want with these files, display them, etc.
  + *   //expensive FTPFile objects not created until needed.
  + *}
  + * /pre
  + * 
* @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @version $Id$
* @see org.apache.commons.net.ftp.FTPFile
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java FTPFileEntryParser.java FTPFileIterator.java FTPFileList.java FTPFileListParser.java FTPFileListParserImpl.java

2003-03-06 Thread scohen
scohen  2003/03/06 04:38:43

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
FTPFileEntryParser.java FTPFileIterator.java
FTPFileList.java FTPFileListParser.java
FTPFileListParserImpl.java
  Log:
  Make the style gods happier.
  
  Revision  ChangesPath
  1.7   +38 -17
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FTPClient.java2 Mar 2003 18:15:24 -   1.6
  +++ FTPClient.java6 Mar 2003 12:38:41 -   1.7
  @@ -2021,31 +2021,52 @@
   }
   
   /**
  - * Using a programmer specified code FTPFileEntryParser /code, 
  - * initialize an object containing a raw file information for the 
  - * current working directory.  This information is obtained through 
  - * the LIST command.  This object is then capable of being iterated to 
  + * Using a programmer specified code FTPFileEntryParser /code,
  + * initialize an object containing a raw file information for the
  + * current working directory.  This information is obtained through
  + * the LIST command.  This object is then capable of being iterated to
* return a sequence of FTPFile objects with information filled in by the
* code FTPFileEntryParser /code used.
  + * p
* The server may or may not expand glob expressions.  You should avoid
* using glob expressions because the return format for glob listings
* differs from server to server and will likely cause this method to fail.
* p
  + * This method differs from using the listFiles() methods in that
  + * expensive FTPFile objects are not created until needed which may be
  + * an advantage on large lists.
  + * 
* @param parser The code FTPFileEntryParser /code that should be
  - * used to parse each server file listing.   
  - * @return An iteratable object that holds the raw information and is 
  - * capable of providing parsed FTPFile objects, one for each file containing
  - * information contained in the given path in the format determined by the 
  - * code parser /code parameter.   Null will be returned if a 
  - * data connection cannot be opened.  If the current working directory 
  - * contains no files, an empty array will be the return.
  + *   used to parse each server file listing.
  + * 
  + * @return An iteratable object that holds the raw information and is
  + * capable of providing parsed FTPFile objects, one for each file 
containing
  + * information contained in the given path in the format determined by 
the
  + * code parser /code parameter.   Null will be returned if a
  + * data connection cannot be opened.  If the current working directory
  + * contains no files, an empty array will be the return.
  + * @example pre
  + *FTPClient f=FTPClient();
  + *f.connect(server);
  + *f.login(username, password);
  + *FTPFileList list = createFTPFileList(directory, parser);
  + *FTPFileIterator iter = list.iterator();
  + * 
  + *while (iter.hasNext()) {
  + *   FTPFile[] files = iter.getNext(25);  // page size you want
  + *   //do whatever you want with these files, display them, etc.
  + *   //expensive FTPFile objects not created until needed.
  + *}
  + * /pre
  + * 
* @exception FTPConnectionClosedException
  - *  If the FTP server prematurely closes the connection as a result
  - *  of the client being idle or some other reason causing the server
  - *  to send FTP reply code 421.  This exception may be caught either
  - *  as an IOException or independently as itself.
  - * @exception IOException  If an I/O error occurs while either sending a
  - *  command to the server or receiving a reply from the server.
  + *   If the FTP server prematurely closes the connection as a 
result
  + *   of the client being idle or some other reason causing the 
server
  + *   to send FTP reply code 421.  This exception may be caught 
either
  + *   as an IOException or independently as itself.
  + * @exception IOException
  + *   If an I/O error occurs while either sending a
  + *   command to the server or receiving a reply from the server.
* @see FTPFileList
*/
   public FTPFileList createFileList(FTPFileEntryParser parser)
  
  
  
  1.4   +8 -6

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParser.java NTFTPEntryParser.java OS2FTPEntryParser.java UnixFTPEntryParser.java VMSFTPEntryParser.java

2003-03-05 Thread scohen
scohen  2003/03/05 19:28:36

  Modified:net/src/java/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParser.java
NTFTPEntryParser.java OS2FTPEntryParser.java
UnixFTPEntryParser.java VMSFTPEntryParser.java
  Log:
  make checkstyle happier.  Note that problems with IllegalArgumentException
  are a bug in checkstyle.  RuntimeExceptions do not need to be declared, but
  they should especially be commented.
  
  Revision  ChangesPath
  1.2   +25 -9 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java
  
  Index: EnterpriseUnixFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnterpriseUnixFTPEntryParser.java 2 Mar 2003 18:18:24 -   1.1
  +++ EnterpriseUnixFTPEntryParser.java 6 Mar 2003 03:28:35 -   1.2
  @@ -60,21 +60,37 @@
   
   /**
* Parser for the Connect Enterprise Unix FTP Server From Sterling Commerce.  
  + * Here is a sample of the sort of output line this parser processes:
  + *  -C--E-FTP B QUA1I1  18128   41 Aug 12 13:56 QUADTEST
* @version $Id$
* @author a href=[EMAIL PROTECTED]Winston Ojeda/a
*/
   public class EnterpriseUnixFTPEntryParser extends FTPFileListParserImpl
   {
   
  -// sample output line
  -//-C--E-FTP B QUA1I1  18128   41 Aug 12 13:56 QUADTEST
  -private static final String MONTHS = 
(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec);
  +/**
  + * months abbreviations looked for by this parser.  Also used
  + * to determine bwhich/b month has been matched by the parser.
  + */
  +private static final String MONTHS = 
  +(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec);
  +
  +/**
  + * this is the regular expression used by this parser.
  + */
   private static final String REGEX = 
  -
(([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z]))
 + 
  - (\\S*)\\s* + (\\S+)\\s* + (\\S*)\\s* + (\\d*)\\s* + 
  - (\\d*)\\s* + MONTHS + \\s* + ((?:[012]\\d*)|(?:3[01]))\\s* + 
  - ((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s + 
  - (\\S*)(\\s*.*);
  +(([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])
  ++ ([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z]))
  ++ (\\S*)\\s* 
  ++ (\\S+)\\s* 
  ++ (\\S*)\\s* 
  ++ (\\d*)\\s* 
  ++ (\\d*)\\s* 
  ++ MONTHS 
  ++ \\s* 
  ++ ((?:[012]\\d*)|(?:3[01]))\\s* 
  ++ ((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s 
  ++ (\\S*)(\\s*.*);
   
   /**
* The sole constructor for a EnterpriseUnixFTPEntryParser object.
  
  
  
  1.3   +13 -10
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
  
  Index: NTFTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NTFTPEntryParser.java 2 Mar 2003 19:36:44 -   1.2
  +++ NTFTPEntryParser.java 6 Mar 2003 03:28:36 -   1.3
  @@ -104,16 +104,19 @@
*/
   public class NTFTPEntryParser extends FTPFileListParserImpl
   {
  +/**
  + * this is the regular expression used by this parser.
  + */
   private static final String REGEX =
  -((?:0[1-9])|(?:1[0-2]))- +
  -((?:0[1-9])|(?:[1-2]\\d)|(?:3[0-1]))- +
  -(\\d\\d)\\s* +
  -((?:0[1-9])|(?:1[012])): +
  -([0-5]\\d)\\s* +
  -([AP])M\\s* +
  -(DIR)?\\s* +
  -([0-9]+)?\\s* +
  -(\\S.*);
  +((?:0[1-9])|(?:1[0-2]))- 
  ++ ((?:0[1-9])|(?:[1-2]\\d)|(?:3[0-1]))- 
  ++ (\\d\\d)\\s* 
  ++ ((?:0[1-9])|(?:1[012])): 
  ++ ([0-5]\\d)\\s* 
  ++ ([AP])M\\s* 
  ++ (DIR)?\\s* 
  ++ ([0-9]+)?\\s* 
  ++ (\\S.*);
   
   /**
* The sole constructor for an NTFTPEntryParser object.
  
  
  
  1.3   +13 -10
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java
  
  Index: OS2FTPEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OS2FTPEntryParser.java2 Mar 2003 19:36:44 -   1.2
  +++ OS2FTPEntryParser.java

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser - New directory

2003-03-02 Thread scohen
scohen  2003/03/02 09:53:01

  jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser - New directory

2003-03-02 Thread scohen
scohen  2003/03/02 09:58:28

  jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPFileEntryParser.java FTPFileIterator.java FTPFileList.java FTPFileListParserImpl.java FTPClient.java

2003-03-02 Thread scohen
scohen  2003/03/02 10:15:24

  Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java
  Added:   net/src/java/org/apache/commons/net/ftp
FTPFileEntryParser.java FTPFileIterator.java
FTPFileList.java FTPFileListParserImpl.java
  Log:
  new parsing system formerly in ftp 2 directory, moving to main stem now.  This 
version provides a means of solving the problem of ftp entries that span more than one
  line.
  
  Revision  ChangesPath
  1.6   +84 -0 
jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FTPClient.java26 Jan 2003 00:21:43 -  1.5
  +++ FTPClient.java2 Mar 2003 18:15:24 -   1.6
  @@ -2020,6 +2020,90 @@
   return listFiles(__fileListParser);
   }
   
  +/**
  + * Using a programmer specified code FTPFileEntryParser /code, 
  + * initialize an object containing a raw file information for the 
  + * current working directory.  This information is obtained through 
  + * the LIST command.  This object is then capable of being iterated to 
  + * return a sequence of FTPFile objects with information filled in by the
  + * code FTPFileEntryParser /code used.
  + * The server may or may not expand glob expressions.  You should avoid
  + * using glob expressions because the return format for glob listings
  + * differs from server to server and will likely cause this method to fail.
  + * p
  + * @param parser The code FTPFileEntryParser /code that should be
  + * used to parse each server file listing.   
  + * @return An iteratable object that holds the raw information and is 
  + * capable of providing parsed FTPFile objects, one for each file containing
  + * information contained in the given path in the format determined by the 
  + * code parser /code parameter.   Null will be returned if a 
  + * data connection cannot be opened.  If the current working directory 
  + * contains no files, an empty array will be the return.
  + * @exception FTPConnectionClosedException
  + *  If the FTP server prematurely closes the connection as a result
  + *  of the client being idle or some other reason causing the server
  + *  to send FTP reply code 421.  This exception may be caught either
  + *  as an IOException or independently as itself.
  + * @exception IOException  If an I/O error occurs while either sending a
  + *  command to the server or receiving a reply from the server.
  + * @see FTPFileList
  + */
  +public FTPFileList createFileList(FTPFileEntryParser parser)
  +throws IOException
  +{
  +return createFileList(null, parser);
  +}
  +
  +/**
  + * Using a programmer specified code FTPFileEntryParser /code, 
  + * initialize an object containing a raw file information for a directory 
  + * or information for a single file.  This information is obtained through 
  + * the LIST command.  This object is then capable of being iterated to 
  + * return a sequence of FTPFile objects with information filled in by the
  + * code FTPFileEntryParser /code used.
  + * The server may or may not expand glob expressions.  You should avoid
  + * using glob expressions because the return format for glob listings
  + * differs from server to server and will likely cause this method to fail.
  + * p
  + * @param parser The code FTPFileEntryParser /code that should be
  + * used to parse each server file listing.   
  + * @param pathname  The file or directory to list.
  + * @return An iteratable object that holds the raw information and is 
  + * capable of providing parsed FTPFile objects, one for each file containing
  + * information contained in the given path in the format determined by the 
  + * code parser /code parameter.  Null will be returned if a 
  + * data connection cannot be opened.  If the supplied path contains
  + * no files, an empty array will be the return.
  + * @exception FTPConnectionClosedException
  + *  If the FTP server prematurely closes the connection as a result
  + *  of the client being idle or some other reason causing the server
  + *  to send FTP reply code 421.  This exception may be caught either
  + *  as an IOException or independently as itself.
  + * @exception IOException  If an I/O error occurs while either sending a
  + *  command to the server or receiving a reply from the server.
  + * @see FTPFileList
  + */
  +public FTPFileList createFileList(String

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParser.java NTFTPEntryParser.java OS2FTPEntryParser.java UnixFTPEntryParser.java VMSFTPEntryParser.java

2003-03-02 Thread scohen
scohen  2003/03/02 10:18:24

  Added:   net/src/java/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParser.java
NTFTPEntryParser.java OS2FTPEntryParser.java
UnixFTPEntryParser.java VMSFTPEntryParser.java
  Log:
  new FTPFileEntryParsers, formerly in ftp2
  
  Revision  ChangesPath
  1.1  
jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java
  
  Index: EnterpriseUnixFTPEntryParser.java
  ===
  package org.apache.commons.net.ftp.parser;
  
  /* 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *if any, must include the following acknowledgment:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowledgment may appear in the software itself,
   *if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names Apache and Apache Software Foundation and
   *Apache Commons must not be used to endorse or promote products
   *derived from this software without prior written permission. For
   *written permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache,
   *nor may Apache appear in their name, without
   *prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   */
  import java.util.Calendar;
  
  import org.apache.commons.net.ftp.FTPFile;
  import org.apache.commons.net.ftp.FTPFileListParserImpl;
  
  /**
   * Parser for the Connect Enterprise Unix FTP Server From Sterling Commerce.  
   * @version $Id: EnterpriseUnixFTPEntryParser.java,v 1.1 2003/03/02 18:18:24 scohen 
Exp $
   * @author a href=[EMAIL PROTECTED]Winston Ojeda/a
   */
  public class EnterpriseUnixFTPEntryParser extends FTPFileListParserImpl
  {
  
  // sample output line
  //-C--E-FTP B QUA1I1  18128   41 Aug 12 13:56 QUADTEST
  private static final String MONTHS = 
(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec);
  private static final String REGEX = 
  
(([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z]))
 + 
   (\\S*)\\s* + (\\S+)\\s* + (\\S*)\\s* + (\\d*)\\s* + 
   (\\d*)\\s* + MONTHS + \\s* + ((?:[012]\\d*)|(?:3[01]))\\s* + 
   ((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s + 
   (\\S*)(\\s*.*);
  
  /**
   * The sole constructor for a EnterpriseUnixFTPEntryParser object.
   * 
   */
  public EnterpriseUnixFTPEntryParser()
  {
  super(REGEX);
  }
  
  /**
   * Parses a line of a unix FTP server file listing and converts  it into a
   * usable format in the form of an code FTPFile /code  instance.  If
   * the file listing line doesn't describe a file,  code null /code is
   * returned, otherwise a code FTPFile /code  instance representing

cvs commit: jakarta-commons/net project.xml

2003-03-02 Thread scohen
scohen  2003/03/02 10:22:05

  Modified:net  project.xml
  Log:
  add dependency for oro jar
  
  Revision  ChangesPath
  1.23  +6 -1  jakarta-commons/net/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/project.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- project.xml   28 Feb 2003 02:44:47 -  1.22
  +++ project.xml   2 Mar 2003 18:22:05 -   1.23
  @@ -110,7 +110,12 @@
   /contributor
 /contributors
 
  -  dependencies/
  +  dependencies
  + dependency
  +idoro/id
  +version2.0.7/version
  +  /dependency
  +  /dependencies
 
 build
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net build.xml

2003-03-02 Thread scohen
scohen  2003/03/02 10:22:24

  Modified:net  build.xml
  Log:
  add dependency for oro jar
  
  Revision  ChangesPath
  1.16  +6 -4  jakarta-commons/net/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-commons/net/build.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- build.xml 26 Jan 2003 05:39:25 -  1.15
  +++ build.xml 2 Mar 2003 18:22:24 -   1.16
  @@ -15,7 +15,7 @@
 /property
 property name=javadocdir value=dist/docs/api
 /property
  -  property name=final.name value=commons-net-1.0.0-dev
  +  property name=final.name value=commons-net-1.0.1-dev
 /property
 target name=init description=o Initializes some properties
   mkdir dir=${libdir}
  @@ -41,7 +41,7 @@
 /classpath
   /javac
 /target
  -  target name=jar description=o Create the jar depends=compile
  +  target name=jar description=o Create the jar depends=compile,test
   jar jarfile=target/${final.name}.jar excludes=**/package.html 
basedir=${classesdir}
   /jar
 /target
  @@ -120,7 +120,7 @@
   /tstamp
   property name=copyright value=Copyright amp;copy;  Apache Software 
Foundation. All Rights Reserved.
   /property
  -property name=title value=Jakarta Commons/Net 1.0.0-dev API
  +property name=title value=Jakarta Commons/Net 1.0.1-dev API
   /property
   javadoc use=true private=true destdir=${javadocdir} author=true 
version=true sourcepath=src/java packagenames=org.apache.commons.net.*
 classpath
  @@ -134,6 +134,8 @@
   /javadoc
 /target
 target name=get-deps unless=noget depends=init
  +get dest=${libdir}/oro-2.0.7.jar usetimestamp=true ignoreerrors=true 
src=http://www.ibiblio.org/maven/oro/jars/oro-2.0.7.jar;
  +/get
   get dest=${libdir}/junit-3.8.1.jar usetimestamp=true ignoreerrors=true 
src=http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar;
   /get
   get dest=${libdir}/ant-1.5.jar usetimestamp=true ignoreerrors=true 
src=http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar;
  @@ -147,4 +149,4 @@
   unjar dest=${maven.home} src=${user.home}/maven-install-latest.jar
   /unjar
 /target
  -/project
  +/project
  \ No newline at end of file
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParserTest.java FTPParseTestFramework.java NTFTPEntryParserTest.java OS2FTPEntryParserTest.java UnixFTPEntryParserTest.java VMSFTPEntryParserTest.java

2003-03-02 Thread scohen
scohen  2003/03/02 10:27:41

  Added:   net/src/test/org/apache/commons/net/ftp/parser
EnterpriseUnixFTPEntryParserTest.java
FTPParseTestFramework.java
NTFTPEntryParserTest.java
OS2FTPEntryParserTest.java
UnixFTPEntryParserTest.java
VMSFTPEntryParserTest.java
  Log:
  tests for new FTPFileEntryParsers, formerly in ftp2
  
  Revision  ChangesPath
  1.1  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParserTest.java
  
  Index: EnterpriseUnixFTPEntryParserTest.java
  ===
  package org.apache.commons.net.ftp.parser;
  
  /* 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *if any, must include the following acknowledgment:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowledgment may appear in the software itself,
   *if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names Apache and Apache Software Foundation and
   *Apache Commons must not be used to endorse or promote products
   *derived from this software without prior written permission. For
   *written permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache,
   *nor may Apache appear in their name, without
   *prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   */
  
  
  import junit.framework.TestSuite;
  
  import org.apache.commons.net.ftp.FTPFile;
  import org.apache.commons.net.ftp.FTPFileEntryParser;
  
  /**
   * Tests the EnterpriseUnixFTPEntryParser
   * 
   * @version $Id: EnterpriseUnixFTPEntryParserTest.java,v 1.1 2003/03/02 18:27:41 
scohen Exp $
   * @author a href=mailto:[EMAIL PROTECTED]Winston Ojeda/a
   */
  public class EnterpriseUnixFTPEntryParserTest extends FTPParseTestFramework
  {
  
  private static final String[] BADSAMPLES = 
  {
  zrwxr-xr-x   2 root root 4096 Mar  2 15:13 zxbox, 
  dxrwr-xr-x   2 root root 4096 Aug 24  2001 zxjdbc, 
  drwxr-xr-x   2 root root 4096 Jam  4 00:03 zziplib, 
  drwxr-xr-x   2 root 99   4096 Feb 23 30:01 zzplayer, 
  drwxr-xr-x   2 root root 4096 Aug 36  2001 zztpp, 
  -rw-r--r--   1 14   staff   80284 Aug 22  zxJDBC-1.2.3.tar.gz, 
  -rw-r--r--   1 14   staff  119:26 Aug 22  2000 zxJDBC-1.2.3.zip, 
  -rw-r--r--   1 ftp  no group83853 Jan 22  2001 
zxJDBC-1.2.4.tar.gz, 
  -rw-r--r--   1ftp   nogroup126552 Jan 22  2001 zxJDBC-1.2.4.zip, 
  -rw-r--r--   1 root root   111325 Apr -7 18:79 
zxJDBC-2.0.1b1.tar.gz, 
  drwxr-xr-x   2 root root 4096 Mar  2 15:13 zxbox, 
  drwxr-xr-x   2 root root 4096 Aug 24  2001 zxjdbc

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser FTPParseTestFramework.java NTFTPEntryParserTest.java OS2FTPEntryParserTest.java UnixFTPEntryParserTest.java VMSFTPEntryParserTest.java

2003-03-02 Thread scohen
scohen  2003/03/02 11:36:44

  Modified:net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2
FTPClient2.java FTPFileEntryParser.java
FTPFileIterator.java FTPFileList.java
   net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/parser
NTFTPEntryParser.java OS2FTPEntryParser.java
VMSFTPEntryParser.java
   net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser
FTPParseTestFramework.java
NTFTPEntryParserTest.java
OS2FTPEntryParserTest.java
UnixFTPEntryParserTest.java
VMSFTPEntryParserTest.java
   net/src/java/org/apache/commons/net/ftp
FTPFileEntryParser.java FTPFileIterator.java
FTPFileList.java
   net/src/java/org/apache/commons/net/ftp/parser
NTFTPEntryParser.java OS2FTPEntryParser.java
VMSFTPEntryParser.java
   net/src/test/org/apache/commons/net/ftp/parser
FTPParseTestFramework.java
NTFTPEntryParserTest.java
OS2FTPEntryParserTest.java
UnixFTPEntryParserTest.java
VMSFTPEntryParserTest.java
  Log:
  update developer email address
  
  Revision  ChangesPath
  1.5   +2 -2  
jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPClient2.java
  
  Index: FTPClient2.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPClient2.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FTPClient2.java   26 Jan 2003 00:21:43 -  1.4
  +++ FTPClient2.java   2 Mar 2003 19:36:43 -   1.5
  @@ -72,7 +72,7 @@
* fairly  clear line between the old and the new; it's less confusing that 
* way.
*
  - * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @version $Id$
*/
   public class FTPClient2 extends FTPClient
  
  
  
  1.5   +2 -2  
jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPFileEntryParser.java
  
  Index: FTPFileEntryParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPFileEntryParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FTPFileEntryParser.java   26 Jan 2003 00:21:43 -  1.4
  +++ FTPFileEntryParser.java   2 Mar 2003 19:36:43 -   1.5
  @@ -64,7 +64,7 @@
* case you would create your own implementation of FTPFileEntryParser and
* if necessary, subclass FTPFile.
*
  - * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @version $Id$
* @see org.apache.commons.net.ftp.FTPFile
* @see FTPClient2#listFiles
  
  
  
  1.5   +2 -2  
jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPFileIterator.java
  
  Index: FTPFileIterator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPFileIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FTPFileIterator.java  26 Jan 2003 00:21:43 -  1.4
  +++ FTPFileIterator.java  2 Mar 2003 19:36:43 -   1.5
  @@ -64,7 +64,7 @@
* syntax familiar from Java 2 collections.  Alternatively, entries may
* be receieved as an array of any requested number of entries or all of them.
*
  - * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @version $Id$
* @see org.apache.commons.net.ftp.ftp2.FTPFileList
*/
  
  
  
  1.5   +2 -2  
jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPFileList.java
  
  Index: FTPFileList.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/java/org/apache/commons/net/ftp/ftp2/FTPFileList.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FTPFileList.java  26 Jan 2003 00:21:43 -  1.4
  +++ FTPFileList.java  2 Mar 2003 19:36:43 -   1.5
  @@ -76,7 +76,7 @@
* prior to it as the older code(FTPClient.listFiles()/code methods did, 
* which required a bigger memory hit.
*
  - * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser NTFTPEntryParserTest.java OS2FTPEntryParserTest.java UnixFTPEntryParserTest.java VMSFTPEntryParserTest.java

2003-03-02 Thread scohen
scohen  2003/03/02 11:47:00

  Modified:net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser
NTFTPEntryParserTest.java
OS2FTPEntryParserTest.java
UnixFTPEntryParserTest.java
VMSFTPEntryParserTest.java
   net/src/test/org/apache/commons/net/ftp/parser
NTFTPEntryParserTest.java
OS2FTPEntryParserTest.java
UnixFTPEntryParserTest.java
VMSFTPEntryParserTest.java
  Log:
  update developer email address
  
  Revision  ChangesPath
  1.7   +2 -2  
jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/NTFTPEntryParserTest.java
  
  Index: NTFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/NTFTPEntryParserTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NTFTPEntryParserTest.java 2 Mar 2003 19:36:43 -   1.6
  +++ NTFTPEntryParserTest.java 2 Mar 2003 19:46:59 -   1.7
  @@ -60,7 +60,7 @@
   import junit.framework.TestSuite;
   
   /**
  - * @author a href=mailto:[EMAIL PROTECTED]@apache.orgSteve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @versionn $Id$
*/
   public class NTFTPEntryParserTest extends FTPParseTestFramework
  
  
  
  1.7   +2 -2  
jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/OS2FTPEntryParserTest.java
  
  Index: OS2FTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/OS2FTPEntryParserTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OS2FTPEntryParserTest.java2 Mar 2003 19:36:43 -   1.6
  +++ OS2FTPEntryParserTest.java2 Mar 2003 19:46:59 -   1.7
  @@ -59,7 +59,7 @@
   import org.apache.commons.net.ftp.ftp2.FTPFileEntryParser;
   
   /**
  - * @author a href=mailto:[EMAIL PROTECTED]@apache.orgSteve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @version $Id$
*/
   public class OS2FTPEntryParserTest extends FTPParseTestFramework
  
  
  
  1.8   +2 -2  
jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/UnixFTPEntryParserTest.java
  
  Index: UnixFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/UnixFTPEntryParserTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- UnixFTPEntryParserTest.java   2 Mar 2003 19:36:43 -   1.7
  +++ UnixFTPEntryParserTest.java   2 Mar 2003 19:46:59 -   1.8
  @@ -60,7 +60,7 @@
   import org.apache.commons.net.ftp.ftp2.FTPFileEntryParser;
   
   /**
  - * @author a href=mailto:[EMAIL PROTECTED]@apache.orgSteve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @versionn $Id$
*/
   public class UnixFTPEntryParserTest extends FTPParseTestFramework
  
  
  
  1.7   +2 -2  
jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/VMSFTPEntryParserTest.java
  
  Index: VMSFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/proposal/ftp2/src/test/org/apache/commons/net/ftp/ftp2/parser/VMSFTPEntryParserTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- VMSFTPEntryParserTest.java2 Mar 2003 19:36:43 -   1.6
  +++ VMSFTPEntryParserTest.java2 Mar 2003 19:46:59 -   1.7
  @@ -60,7 +60,7 @@
   import org.apache.commons.net.ftp.ftp2.FTPFileEntryParser;
   
   /**
  - * @author a href=mailto:[EMAIL PROTECTED]@apache.orgSteve Cohen/a
  + * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a
* @version $Id$
*/
   public class VMSFTPEntryParserTest extends FTPParseTestFramework
  
  
  
  1.3   +2 -2  
jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
  
  Index: NTFTPEntryParserTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NTFTPEntryParserTest.java 2 Mar 2003 19:36:44 -   1.2
  +++ NTFTPEntryParserTest.java 2 Mar 2003 19:47:00 -   1.3
  @@ -60,7 +60,7 @@
   import junit.framework.TestSuite;
   
   /**
  - * @author a href=mailto:[EMAIL PROTECTED

  1   2   >