commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (NET-458) MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
Date Wed, 17 Apr 2013 19:59:18 GMT

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

Sebb updated NET-458:
---------------------

    Fix Version/s: 3.2
    
> MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------
>
>                 Key: NET-458
>                 URL: https://issues.apache.org/jira/browse/NET-458
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1, 3.1
>         Environment: zOS
>            Reporter: Denis Molony
>             Fix For: 3.2
>
>
> Line 360 in MVSFTPEntryParser.parseSimpleEntry :
>     String name = entry.split(" ")[0];
> gives an ArrayIndexOutOfBoundsException: 0
> It appears to be caused by a partitioned dataset whose members only contain names. No
other details (creation date, file type etc).
> This is the method, if it helps:
> {code}
> private boolean parseSimpleEntry(FTPFile file, String entry) {
>     if (entry != null && entry.length() > 0) {
>         file.setRawListing(entry);
>         String name = entry.split(" ")[0];           // <--- error occurs here
>         file.setName(name);
>         file.setType(FTPFile.FILE_TYPE);
>         return true;
>     }
>     return false;
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message