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 34817] New: - VFS : ClassCastException
Date Mon, 09 May 2005 13:29:36 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=34817>.
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=34817

           Summary: VFS : ClassCastException
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Sandbox
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: philippe.poulard@inria.fr


Hi,

An abusive class cast cause a ClassCastException in
org.apache.commons.vfs.provider.AbstractFileObject#copyFrom( FileObject file,
FileSelector selector )

This occurs while passing a FileObject instance that is not a AbstractFileObject
Snippet code in fault :
        // Locate the files to copy across
        final ArrayList files = new ArrayList();
        ((AbstractFileObject) file).findFiles(selector, false, files);
Correct code (suggestion) :
        final List files = Arrays.asList( file.findFiles( selector ) );
I use the above code in the FileObject supplied by my provider, but it should be
corrected in org.apache.commons.vfs.provider.AbstractFileObject

I'm developping a provider for XML:DB bound to the "xmldb" scheme.
(if you want to, I'll give you the entire code when it will be done)

Regards,
Philippe Poulard

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