This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: another fix for PR 27163
- From: Tom Tromey <tromey at redhat dot com>
- To: classpath-patches at gnu dot org
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 21 Apr 2006 15:35:24 -0600
- Subject: Patch: FYI: another fix for PR 27163
- Reply-to: tromey at redhat dot com
I'm checking this in to classpath and the gcj 4.1 branch.
This is another fix related to PR 27163. We were sending a 'CWD'
command with no argument.
The real bug, though, seems to be a problem with available() on a
socket. It is hard to be sure, though, since in some tests gij gets
the right answer but it still fails on the test case in the PR.
Tom
2006-04-21 Tom Tromey <tromey@redhat.com>
PR classpath/27163:
* gnu/java/net/protocol/ftp/FTPConnection.java
(changeWorkingDirectory): Do nothing if path is empty.
Index: gnu/java/net/protocol/ftp/FTPConnection.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/ftp/FTPConnection.java,v
retrieving revision 1.3
diff -u -r1.3 FTPConnection.java
--- gnu/java/net/protocol/ftp/FTPConnection.java 2 Jul 2005 20:32:13 -0000 1.3
+++ gnu/java/net/protocol/ftp/FTPConnection.java 21 Apr 2006 21:39:32 -0000
@@ -429,6 +429,9 @@
public boolean changeWorkingDirectory(String path)
throws IOException
{
+ // Do nothing if the path is empty.
+ if (path.length() == 0)
+ return true;
String cmd = CWD + ' ' + path;
send(cmd);
FTPResponse response = getResponse();