Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-515

FTPClient sample in class javadoc "bug"

    Details

    • Type: Task
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: FTP
    • Labels:
      None
    • Environment:

      org.apache.commons.net.ftp.FTPClient

      Description

      int reply;
      ftp.connect("ftp.foobar.com");
      System.out.println("Connected to " + server + ".");
      System.out.print(ftp.getReplyString());

      (Line 2) ftp.connect parameter values contains the server from next line. It looks like better and can use with copy/paste with one line more

      int reply;
      String server = "ftp.foobar.com";
      ftp.connect(server);
      System.out.println("Connected to " + server + ".");
      System.out.print(ftp.getReplyString());

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bastie Sebastian Ritter
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified