commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank (JIRA)" <>
Subject [jira] Created: (VFS-212) Bugs in operations classes
Date Sat, 12 Jul 2008 18:05:31 GMT
Bugs in operations classes

                 Key: VFS-212
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.1
         Environment: all
            Reporter: Frank

I tried to work with operations and I found some problems.

The DefaultFileOperations class iterates over several operation providers to find the requested
operation. However, in the class AbstractFileOperationProvider the method lookupOperation
will throw an exception when the requested operation does not exist. This makes it impossible
to have multiple OperationProviders that each add some operations, because if your operation
is not contained in the first provider that is checked the search is aborted.

To fix this lookupOperation should return null when the operation is not found. Method getOperation
should also handle the case that lookupOperation returns null. 

Another problem is that the StandardFileSystemManager only loads an OperationProvider if there
is a Provider for the associated schema. I lost several hours trying to find why my OperationProvider
was not loaded. Turns out that my OperationProvider was in the classpath before the Provider,
and the StandardFileSystemManager discarded my OperationProvider. The classpath is constructed
dynamically using in a script so it's not possible to influence the order other than changing
the name of the jar that contains the providers file; which is not really an elegant solution.

I don't quite see the necessity to filter the OperationProvider in such a way; I suggest that
all found OperationProviders are loaded when found regardless if the schema was already registered
or not.

I find the operations classes rather confusing, but I'll submit something about that somewhere

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

View raw message