[jira] [Created] (NET-390) FTPFile.toString() should return formatted version of its fields, not the unformatted original

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (NET-390) FTPFile.toString() should return formatted version of its fields, not the unformatted original

JIRA jira@apache.org
FTPFile.toString() should return formatted version of its fields, not the unformatted original
----------------------------------------------------------------------------------------------

                 Key: NET-390
                 URL: https://issues.apache.org/jira/browse/NET-390
             Project: Commons Net
          Issue Type: Improvement
          Components: FTP
            Reporter: Sebb


The toString() method in FTPFile currently returns the unformatted original string, which is not very useful.

It should return a String created from the parsed fields.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (NET-390) FTPFile.toString() should return formatted version of its fields, not the unformatted original

JIRA jira@apache.org

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

Sebb resolved NET-390.
----------------------

       Resolution: Fixed
    Fix Version/s: 3.0

> FTPFile.toString() should return formatted version of its fields, not the unformatted original
> ----------------------------------------------------------------------------------------------
>
>                 Key: NET-390
>                 URL: https://issues.apache.org/jira/browse/NET-390
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> The toString() method in FTPFile currently returns the unformatted original string, which is not very useful.
> It should return a String created from the parsed fields.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (NET-390) FTPFile.toString() should return formatted version of its fields, not the unformatted original

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/NET-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010283#comment-13010283 ]

Steve Cohen commented on NET-390:
---------------------------------

A change like this would undoubtedly break existing users.  A better idea would be a toFormattedString() method.  But before someone dives into that, let's get a better idea of what you'd like it to see.

> FTPFile.toString() should return formatted version of its fields, not the unformatted original
> ----------------------------------------------------------------------------------------------
>
>                 Key: NET-390
>                 URL: https://issues.apache.org/jira/browse/NET-390
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> The toString() method in FTPFile currently returns the unformatted original string, which is not very useful.
> It should return a String created from the parsed fields.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (NET-390) FTPFile.toString() should return formatted version of its fields, not the unformatted original

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/NET-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010313#comment-13010313 ]

Sebb commented on NET-390:
--------------------------

There's already a method to return the unformatted string.

> FTPFile.toString() should return formatted version of its fields, not the unformatted original
> ----------------------------------------------------------------------------------------------
>
>                 Key: NET-390
>                 URL: https://issues.apache.org/jira/browse/NET-390
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> The toString() method in FTPFile currently returns the unformatted original string, which is not very useful.
> It should return a String created from the parsed fields.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (NET-390) FTPFile.toString() should return formatted version of its fields, not the unformatted original

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/NET-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010468#comment-13010468 ]

Steve Cohen commented on NET-390:
---------------------------------

That may be so, but what do you do about the users who may be using toString() to return the unformatted string and will now get something they are not expecting?


> FTPFile.toString() should return formatted version of its fields, not the unformatted original
> ----------------------------------------------------------------------------------------------
>
>                 Key: NET-390
>                 URL: https://issues.apache.org/jira/browse/NET-390
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> The toString() method in FTPFile currently returns the unformatted original string, which is not very useful.
> It should return a String created from the parsed fields.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (NET-390) FTPFile.toString() should return formatted version of its fields, not the unformatted original

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/NET-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010505#comment-13010505 ]

Sebb commented on NET-390:
--------------------------

The original Javadoc says

{quote}
Returns a string representation of the FTPFile information.  This
will be the raw FTP server listing that was used to initialize the
FTPFile instance.
{quote}

I read the first sentence as meaning that the representation is not fixed - it is "*a* representation".
I read the second sentence as meaning that the raw listing is the current representation.

But I take your point that some may have relied on the original implementation.

> FTPFile.toString() should return formatted version of its fields, not the unformatted original
> ----------------------------------------------------------------------------------------------
>
>                 Key: NET-390
>                 URL: https://issues.apache.org/jira/browse/NET-390
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> The toString() method in FTPFile currently returns the unformatted original string, which is not very useful.
> It should return a String created from the parsed fields.

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