You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2011/06/04 20:56:47 UTC

[jira] [Reopened] (NET-386) Javadoc examples refer to code that has been removed.

     [ https://issues.apache.org/jira/browse/NET-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb reopened NET-386:
----------------------


> Javadoc examples refer to code that has been removed.
> -----------------------------------------------------
>
>                 Key: NET-386
>                 URL: https://issues.apache.org/jira/browse/NET-386
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 2.0, 2.2
>         Environment: any
>            Reporter: Steve Cohen
>            Assignee: Steve Cohen
>            Priority: Minor
>              Labels: javadoc
>             Fix For: 3.0
>
>
> The first example on the org.apache.commons.net.ftp.FTPFileEntryParser javadoc page refers to classes that have been removed since version 2.0:
>     FTPClient f=FTPClient();
>     f.connect(server);
>     f.login(username, password);
>     FTPFileList list = f.createFileList(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.
>     }
> FTPFileList and FTPFileIterator no longer exist.
> There is a good replacement for this example on the org.apache.commons.net.ftp.FTPListParseEngine javadoc page and that example should simply replace the one on the FTPFileEntryParser page.
>     FTPClient f=FTPClient();
>     f.connect(server);
>     f.login(username, password);
>     FTPListParseEngine engine = f.initiateListParsing(directory);
>     while (engine.hasNext()) {
>        FTPFile[] files = engine.getNext(25);  // "page size" you want
>        //do whatever you want with these files, display them, etc.
>        //expensive FTPFile objects not created until needed.
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira