Commons Net
  1. Commons Net
  2. NET-425

_openDataConnection_, __storeFile, and __storeFileStream should be protected and take String for FTP command.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1
    • Component/s: FTP
    • Labels:
      None
    • Environment:

      All

      Description

      Currently _storeFile, __storeStream, and _openConnection are declared as private and only receive int commands. I am trying to extend the FTPClient class to implement specialized commands that utilize these methods. In order for this to work I need to have these methods declared as protected as well as adjust the parameters to allow for String commands.

      1. retrievefile.patch
        6 kB
        Steven Jardine
      2. patch.txt
        3 kB
        Steven Jardine

        Activity

        Hide
        Sebb added a comment -

        Thanks.

        I modified the patch slightly; got rid of the private methods (only used once) and rearranged the methods to simplify the difference between versions.

        Show
        Sebb added a comment - Thanks. I modified the patch slightly; got rid of the private methods (only used once) and rearranged the methods to simplify the difference between versions.
        Hide
        Steven Jardine added a comment -

        Fixed a bug with the patch.

        Show
        Steven Jardine added a comment - Fixed a bug with the patch.
        Hide
        Steven Jardine added a comment -

        While implementing my client I noticed a similiar problem with the receiveFile and receiveFileStream methods.

        I have implemented __receiveFile, _receiveFile, __receiveFileStream, _receiveFileStream similiar to the __storeFile methods and modified the receiveFile and receiveFileStream methods to use these.

        Please consider my patch for inclusion.

        Show
        Steven Jardine added a comment - While implementing my client I noticed a similiar problem with the receiveFile and receiveFileStream methods. I have implemented __receiveFile, _receiveFile, __receiveFileStream, _receiveFileStream similiar to the __storeFile methods and modified the receiveFile and receiveFileStream methods to use these. Please consider my patch for inclusion.
        Hide
        Steven Jardine added a comment -

        I only use the String methods. I guess you could leave the int methods private but I really don't see why private access is required for these methods.

        Show
        Steven Jardine added a comment - I only use the String methods. I guess you could leave the int methods private but I really don't see why private access is required for these methods.
        Hide
        Sebb added a comment -

        Do you really require access to both the String and int versions of the methods?

        Show
        Sebb added a comment - Do you really require access to both the String and int versions of the methods?
        Hide
        Steven Jardine added a comment -

        Please consider the attached patch for inclusion in the project.

        Show
        Steven Jardine added a comment - Please consider the attached patch for inclusion in the project.

          People

          • Assignee:
            Unassigned
            Reporter:
            Steven Jardine
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development