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

Hans Brende updated ANY23-330:
------------------------------
    Description: 
I've been peeking at the Any23PluginManager class. There are a few issues:

1. {{getPlugins(Class<T>)}}, {{getTools()}}, {{getExtractors()}}, and 
{{getApplicableTools()}} never throw any exceptions, yet they all declare: 
*{{throws IOException}}*.

2. {{configureExtractors(File...)}}, {{configureExtractors(ExtractorGroup)}}, 
and {{getApplicableExtractors(ExtractorRegistry, File...)}} all throw 
{{ServiceConfigurationError}}, but instead declare: *{{throws IOException, 
IllegalAccessException, InstantiationException}}* (none of which are ever 
thrown).

3. {{getApplicableExtractors(ExtractorRegistry, File...)}} never uses the 
{{ExtractorRegistry}} argument. Behavior is identical to 
{{configureExtractors(File...)}}. Behavior does not match javadoc.

4. {{configureExtractors(ExtractorGroup)}} never uses the {{ExtractorGroup}} 
argument (but this deleting this parameter would create confusion with the 
variadic {{configureExtractors(File...)}} method). Behavior does not match 
javadoc.

I'd argue that some of these methods are completely useless and should be 
removed. None of them are being used in the OpenIE dynamic jar loading example 
in the web service except {{getExtractors()}}.

Note: after these issues are resolved, we may have to revisit ANY23-333.

  was:
I've been peeking at the Any23PluginManager class. There are a few issues:

1. {{getPlugins(Class<T>)}}, {{getTools()}}, {{getExtractors()}}, and 
{{getApplicableTools()}} never throw any exceptions, yet they all declare: 
*{{throws IOException}}*.

2. {{configureExtractors(File...)}}, {{configureExtractors(ExtractorGroup)}}, 
and {{getApplicableExtractors(ExtractorRegistry, File...)}} all throw 
{{ServiceConfigurationError}}, but instead declare: *{{throws IOException, 
IllegalAccessException, InstantiationException}}* (none of which are ever 
thrown).

3. {{getApplicableExtractors(ExtractorRegistry, File...)}} never uses the 
{{ExtractorRegistry}} argument. Behavior is identical to 
{{configureExtractors(File...)}}. Behavior does not match javadoc.

4. {{configureExtractors(ExtractorGroup)}} never uses the {{ExtractorGroup}} 
argument (but this deleting this parameter would create confusion with the 
variadic {{configureExtractors(File...)}} method). Behavior does not match 
javadoc.

I'd argue that some of these methods are completely useless and should be 
removed. None of them are being used in the OpenIE dynamic jar loading example 
in the web service except {{getExtractors()}}.


> Clean up Any23PluginManager
> ---------------------------
>
>                 Key: ANY23-330
>                 URL: https://issues.apache.org/jira/browse/ANY23-330
>             Project: Apache Any23
>          Issue Type: Bug
>          Components: Plugin Management
>    Affects Versions: 2.1
>            Reporter: Hans Brende
>            Priority: Major
>             Fix For: 2.3
>
>
> I've been peeking at the Any23PluginManager class. There are a few issues:
> 1. {{getPlugins(Class<T>)}}, {{getTools()}}, {{getExtractors()}}, and 
> {{getApplicableTools()}} never throw any exceptions, yet they all declare: 
> *{{throws IOException}}*.
> 2. {{configureExtractors(File...)}}, {{configureExtractors(ExtractorGroup)}}, 
> and {{getApplicableExtractors(ExtractorRegistry, File...)}} all throw 
> {{ServiceConfigurationError}}, but instead declare: *{{throws IOException, 
> IllegalAccessException, InstantiationException}}* (none of which are ever 
> thrown).
> 3. {{getApplicableExtractors(ExtractorRegistry, File...)}} never uses the 
> {{ExtractorRegistry}} argument. Behavior is identical to 
> {{configureExtractors(File...)}}. Behavior does not match javadoc.
> 4. {{configureExtractors(ExtractorGroup)}} never uses the {{ExtractorGroup}} 
> argument (but this deleting this parameter would create confusion with the 
> variadic {{configureExtractors(File...)}} method). Behavior does not match 
> javadoc.
> I'd argue that some of these methods are completely useless and should be 
> removed. None of them are being used in the OpenIE dynamic jar loading 
> example in the web service except {{getExtractors()}}.
> Note: after these issues are resolved, we may have to revisit ANY23-333.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to