You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2008/03/15 03:04:24 UTC

[jira] Created: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Allow FTPFile entries to be generated even if date parsing fails
----------------------------------------------------------------

                 Key: NET-205
                 URL: https://issues.apache.org/jira/browse/NET-205
             Project: Commons Net
          Issue Type: Improvement
            Reporter: Sebb
             Fix For: 1.5, 2.0


Most of the FTPEntryParser classes return null if date parsing fails.

This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.

The suggestion is to allow such entries to be kept, but with a null date.

This is already done by the EnterpriseUnixFTPEntryParser.

Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rory Winston closed NET-205.
----------------------------

    Resolution: Fixed

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 1.5, 2.0
>
>         Attachments: AllowUnparseableDates.patch
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586869#action_12586869 ] 

Sebb commented on NET-205:
--------------------------

Not entirely sure this is needed, given that the problem only occurs if the wrong parser is used.

However, assuming that it does make sense to protect against using the wrong parser, then perhaps this check - or something like it - should be applied to any of the other parsers?

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 1.5, 2.0
>
>         Attachments: AllowUnparseableDates.patch, net-205-invalidDates.diff.txt
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Martin Oberhuber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Oberhuber updated NET-205:
---------------------------------

    Attachment: net-205-invalidDates.diff.txt

I've observed one problem with this change, that a totally wrong FTP parser now easily produces invalid entries when the text that should be a date isn't even remotely a date.

For instance, parsing output of a VMS server with the NTFTPEntryParser, results in this text being parsed as follows:

{noformat}
Total of 5 files, 470/606 blocks

--> datestr = "Total of"
--> size = 5
--> name = "files, 470/606 blocks"
{noformat}

Attached patch gives up when the time parser doesn't even get past the first 4 characters - not sure if that's a good idea, but at least it is closer to what Commons Net was like in previous releases.

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 1.5, 2.0
>
>         Attachments: AllowUnparseableDates.patch, net-205-invalidDates.diff.txt
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb reopened NET-205:
----------------------


> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 1.5, 2.0
>
>         Attachments: AllowUnparseableDates.patch, net-205-invalidDates.diff.txt
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rory Winston updated NET-205:
-----------------------------

    Fix Version/s:     (was: 1.5)
                       (was: 2.0)
                   2.1

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 2.1
>
>         Attachments: AllowUnparseableDates.patch, net-205-invalidDates.diff.txt
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-205:
---------------------

    Fix Version/s:     (was: 2.1)

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>         Attachments: AllowUnparseableDates.patch, net-205-invalidDates.diff.txt
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-205:
---------------------

    Attachment: AllowUnparseableDates.patch

Patch to allow unparseable dates.

Also fixes test suite to check for null date as well as null entry when checking for failures.

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 1.5, 2.0
>
>         Attachments: AllowUnparseableDates.patch
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (NET-205) Allow FTPFile entries to be generated even if date parsing fails

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-205:
---------------------

    Component/s: FTP

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>            Reporter: Sebb
>         Attachments: AllowUnparseableDates.patch, net-205-invalidDates.diff.txt
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.