commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rory Winston (JIRA)" <j...@apache.org>
Subject [jira] Closed: (NET-77) [net] MVSFTPEntryParser setRawListing
Date Tue, 19 Feb 2008 22:34:43 GMT

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

Rory Winston closed NET-77.
---------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

This parser has been rewritten for 2.0

> [net] MVSFTPEntryParser setRawListing
> -------------------------------------
>
>                 Key: NET-77
>                 URL: https://issues.apache.org/jira/browse/NET-77
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Operating System: Windows 2000
> Platform: PC
>            Reporter: Darrin Holst
>             Fix For: 2.0
>
>
> The MVSFTPEntryParser is not setting the raw listing in the FTPFile that it
> creates. The toString on FTPFile returns this value which causes a NPE when
> trying to list files via ant.
> Also it is creating an FTPFile for the header ("Volume Unit...") that it
> receives from the host. This also causes a problem with the list function in ant
> because it receives 2 entries when requesting a listing for 1 file. Ant
> (probably wrongfully) is just taking the first entry in the array that it
> receives back so you never get your file names.
> The following code is how I got it to work...
>     private static final String HEADER = "Volume Unit    Referred Ext Used Recfm
> Lrecl BlkSz Dsorg Dsname";
>    ...
>     public FTPFile parseFTPEntry(String entry)
>     {       
>         FTPFile f = null;
>         if (matches(entry) && !entry.trim().equals(HEADER))          
>         {
>             f = new FTPFile();
>             String dataSetName = group(2);
>             f.setType(FTPFile.FILE_TYPE);
>             f.setName(dataSetName);
>             f.setRawListing(entry);
>             return (f);
>         }
>         return null;
>     }

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


Mime
View raw message