FULL PRODUCT VERSION : A DESCRIPTION OF THE PROBLEM : This is the original source code of the method sun.net.ftp.impl.FtpClient#nameList(): /** * Issues a NLST path command to server to get the specified directory * content. It differs from {@link #list(String)} method by the fact that * it will only list the file names which would make the parsing of the * somewhat easier. * * {@link #completePending()} <b>has</b> to be called once the application * is finished writing to the stream. * * @param path a <code>String</code> containing the pathname of the * directory to list or <code>null</code> for the current working * directory. * @return the <code>InputStream</code> from the resulting data connection * @throws IOException if an error occurs during the transmission. */ public InputStream nameList(String path) throws sun.net.ftp.FtpProtocolException, IOException { Socket s; s = openDataConnection( " NLST " + path); if (s != null) { return createInputStream(s.getInputStream()); } return null; } As can be seen, there is no handling of a null as the path parameter in this code at all (although documented). A null as path doesn't lead to the expected result. REPRODUCIBILITY : This bug can be reproduced always. CUSTOMER SUBMITTED WORKAROUND : Passing an empty String instead of a null as the method argument.
|