You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2020/01/27 18:29:44 UTC
svn commit: r1873225 -
/poi/trunk/src/integrationtest/org/apache/poi/BaseIntegrationTest.java
Author: fanningpj
Date: Mon Jan 27 18:29:43 2020
New Revision: 1873225
URL: http://svn.apache.org/viewvc?rev=1873225&view=rev
Log:
fix NPE in test code
Modified:
poi/trunk/src/integrationtest/org/apache/poi/BaseIntegrationTest.java
Modified: poi/trunk/src/integrationtest/org/apache/poi/BaseIntegrationTest.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/BaseIntegrationTest.java?rev=1873225&r1=1873224&r2=1873225&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/BaseIntegrationTest.java (original)
+++ poi/trunk/src/integrationtest/org/apache/poi/BaseIntegrationTest.java Mon Jan 27 18:29:43 2020
@@ -75,12 +75,13 @@ public class BaseIntegrationTest {
throw e;
} catch (IOException e) {
// ignore some other ways of corrupted files
- if(e.getMessage().contains("Truncated ZIP file")) {
+ String message = e.getMessage();
+ if(message != null && message.contains("Truncated ZIP file")) {
Assume.assumeFalse("File " + file + " excluded because the Zip file is incomplete", true);
}
// sometimes binary format has XML-format-extension...
- if(e.getMessage().contains("rong file format or file extension for OO XML file")) {
+ if(message != null && message.contains("rong file format or file extension for OO XML file")) {
handleWrongOLE2XMLExtension(inputFile, e);
return;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org