tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Palsulich" <tpalsul...@gmail.com>
Subject Re: Review Request 24051: MicrosoftTranslator setClient and setId NPE
Date Tue, 29 Jul 2014 21:02:11 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24051/#review49024
-----------------------------------------------------------



./trunk/tika-translate/src/test/java/org/apache/tika/language/translate/MicrosoftTranslatorTest.java
<https://reviews.apache.org/r/24051/#comment85858>

    Should add a test for Default Translator. Separate issue.



./trunk/tika-translate/src/test/java/org/apache/tika/language/translate/MicrosoftTranslatorTest.java
<https://reviews.apache.org/r/24051/#comment85857>

    Add in a check right here that translator.isAvailable() is false?


- Tyler Palsulich


On July 29, 2014, 1:09 p.m., Chris Mattmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24051/
> -----------------------------------------------------------
> 
> (Updated July 29, 2014, 1:09 p.m.)
> 
> 
> Review request for tika.
> 
> 
> Bugs: TIKA-1378
>     https://issues.apache.org/jira/browse/TIKA-1378
> 
> 
> Repository: tika
> 
> 
> Description
> -------
> 
> I introduced a bug into MicrosoftTranslator that creates an NPE when explicitly configuring
the translator via the setClientId and setSecret methods. Creating the translator and configuring
implicitly with properties still works. This patch fixes the issue and exposes it via a test.
> 
> 
> Diffs
> -----
> 
>   ./trunk/tika-translate/src/main/java/org/apache/tika/language/translate/MicrosoftTranslator.java
1614159 
>   ./trunk/tika-translate/src/test/java/org/apache/tika/language/translate/MicrosoftTranslatorTest.java
1614159 
> 
> Diff: https://reviews.apache.org/r/24051/diff/
> 
> 
> Testing
> -------
> 
> Tested on DARPA XDATA and via https://github.com/chrismattmann/etllib and https://github.com/chrismattmann/tika-python.
> Also added unit test:
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.tika.language.translate.CachedTranslatorTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.221 sec
> Running org.apache.tika.language.translate.GoogleTranslatorTest
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 sec
> Running org.apache.tika.language.translate.MicrosoftTranslatorTest
> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec
> 
> Results :
> 
> Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8.556s
> [INFO] Finished at: Tue Jul 29 09:05:20 EDT 2014
> [INFO] Final Memory: 24M/194M
> [INFO] ------------------------------------------------------------------------
> [chipotle:~/src/tika-translate] mattmann% 
> 
> 
> Thanks,
> 
> Chris Mattmann
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message