commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36249] New: - MVSFTPEntryParser setRawListing
Date Thu, 18 Aug 2005 14:21:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36249>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36249

           Summary: MVSFTPEntryParser setRawListing
           Product: Commons
           Version: 1.4 Final
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: dholst@shazam.net


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;
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message