commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Commented: (NET-215) UNIXFTPEntryParser doesn't preserve trailing whitespace in files
Date Sat, 04 Apr 2009 20:20:13 GMT


Sebb commented on NET-215:

Note that  the regex


means 0 or more whitespace, followed by 0 or more other characters, so it does match trailing
spaces - as shown by  the example.

However, having two "*" quantifiers next to each other tends to make the parsing slower, as
it increases the backtracking that may be required.

> UNIXFTPEntryParser doesn't preserve trailing whitespace in files
> ----------------------------------------------------------------
>                 Key: NET-215
>                 URL:
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Martin Oberhuber
>            Priority: Minor
>             Fix For: 2.1
> From :
> The Commons Net FTP Entry Parsers do not preserve trailing whitespace on file names.
On systems like UNIX that support trailing whitespace, this results in some invalid entries
being parsed.
> The bug seems to be in Jakarta Commons Net UnixFTPEntryParser -- in its REGEX,
> the last field ("endtoken") is declared
>     (\\s*.*)
> which means any whitespace followed by at least one non-whitespace character.
> Which is not the case in case of trailing whitespace.

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

View raw message