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

Frank updated VFS-212:
----------------------

    Attachment: vfs-operations.patch

This is a patch for the problem I described.

> Bugs in operations classes
> --------------------------
>
>                 Key: VFS-212
>                 URL: https://issues.apache.org/jira/browse/VFS-212
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Frank
>         Attachments: vfs-operations.patch
>
>
> 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 else.

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

Reply via email to