[
https://issues.apache.org/jira/browse/TIKA-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906747#comment-14906747
]
Hudson commented on TIKA-1750:
------------------------------
SUCCESS: Integrated in tika-trunk-jdk1.7 #855 (See
[https://builds.apache.org/job/tika-trunk-jdk1.7/855/])
Patch from Yaniv Kunda from TIKA-1750 - avoid NPE in CachedTranslator if no
underlying translator is available (nick:
http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1705107)
*
/tika/trunk/tika-translate/src/main/java/org/apache/tika/language/translate/CachedTranslator.java
> 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
>
> Attachments: TIKA-1750.patch
>
>
> 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)