Author: sebb
Date: Fri Aug 15 11:08:07 2008
New Revision: 686298
URL: http://svn.apache.org/viewvc?rev=686298&view=rev
Log:
NET-230 - ParserInitializationException when connecting to a Unix FTP server:
comparison string must be upper case
Modified:
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
commons/proper/net/branches/NET_2_0/src/site/xdoc/changes.xml
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java
Modified:
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java?rev=686298&r1=686297&r2=686298&view=diff
==============================================================================
---
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
(original)
+++
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
Fri Aug 15 11:08:07 2008
@@ -190,9 +190,12 @@
* This may happen if the ftpd in question was compiled without system
* information.
*
+ * NET-230 - Updated to be UPPERCASE so that the check done in
+ * createFileEntryParser will succeed.
+ *
* @since 1.5
*/
- public static final String SYST_L8 = "Type: L8";
+ public static final String SYST_L8 = "TYPE: L8";
/**
* Identifier by which an Netware-based ftp server is known throughout
Modified: commons/proper/net/branches/NET_2_0/src/site/xdoc/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/site/xdoc/changes.xml?rev=686298&r1=686297&r2=686298&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/site/xdoc/changes.xml (original)
+++ commons/proper/net/branches/NET_2_0/src/site/xdoc/changes.xml Fri Aug 15
11:08:07 2008
@@ -168,6 +168,9 @@
<action dev="sebb" type="fix" issue="NET-223">
the data connection socket is not closed when an IOException
occurred
</action>
+ <action dev="sebb" type="fix" issue="NET-230">
+ ParserInitializationException when connecting to a Unix FTP
server: comparison string must be upper case
+ </action>
</release>
Modified:
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java?rev=686298&r1=686297&r2=686298&view=diff
==============================================================================
---
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java
(original)
+++
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java
Fri Aug 15 11:08:07 2008
@@ -62,6 +62,14 @@
parser = factory.createFileEntryParser("OS/400");
assertTrue(parser instanceof CompositeFileEntryParser);
+ parser = factory.createFileEntryParser("AS/400");
+ assertTrue(parser instanceof CompositeFileEntryParser);
+
+ // Added test to make sure it handles the Unix systems that were
+ // compiled with OS as "UNKNOWN". This test validates that the
+ // check is case-insensitive.
+ parser = factory.createFileEntryParser("UNKNOWN Type: L8");
+
try {
parser = factory.createFileEntryParser("OS2FTPFileEntryParser");
fail("Exception should have been thrown. \"OS2FTPFileEntryParser\"
is not a recognized key");