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

FTPClient sample in class javadoc "bug"

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.3
    • 3.4
    • FTP
    • None
    • 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

            Unassigned Unassigned
            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