Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 12639 invoked from network); 4 Apr 2011 00:25:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Apr 2011 00:25:45 -0000 Received: (qmail 90221 invoked by uid 500); 4 Apr 2011 00:25:45 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 90157 invoked by uid 500); 4 Apr 2011 00:25:45 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 90149 invoked by uid 99); 4 Apr 2011 00:25:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2011 00:25:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2011 00:25:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B542F91BA9 for ; Mon, 4 Apr 2011 00:25:05 +0000 (UTC) Date: Mon, 4 Apr 2011 00:25:05 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: <1061019186.31586.1301876705739.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1567778831.3806.1300806605766.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (NET-386) Javadoc examples refer to code that has been removed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb resolved NET-386. ---------------------- Resolution: Fixed Duplicate of NET-303 > 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 > > 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