Hans Brende created ANY23-330:
---------------------------------
Summary: 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
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()}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)