Yaniv Kunda created TIKA-1750:
---------------------------------
Summary: CachedTranslator.isAvailable() throws NPE when underlying
translator is null
Key: TIKA-1750
URL: https://issues.apache.org/jira/browse/TIKA-1750
Project: Tika
Issue Type: Bug
Components: translation
Reporter: Yaniv Kunda
Priority: Minor
Fix For: 1.11
When initialized with no underlying translator, CachedTranslator throws NPE
when calling isAvailable(), although a user should initialize the translator
(as it says in the default constructor's javadoc), it doesn't always happen and
since CachedTranslator is defined as a registered service in
tika-translate\src\main\resources\META-INF\services\org.apache.tika.language.translate.Translator,
it normally doesn't (causing DumpTikaConfigExampleTest to fail).
Since CachedTranslator is returning the source text when calling
translate(String, String, String) when the translator is null, it makes sense
that isAvailable returns false under the same condition.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)