diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-01-27 18:29:43 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-01-27 18:29:43 +0000 |
commit | d684fe1ebe6af95fcc53feb409bcd05e8f5fb121 (patch) | |
tree | fb6d931470a9026112909a09784b4e1b31e7b112 /src | |
parent | 22a9be87067938549278a969ecfaa2b33144cda3 (diff) | |
download | poi-d684fe1ebe6af95fcc53feb409bcd05e8f5fb121.tar.gz poi-d684fe1ebe6af95fcc53feb409bcd05e8f5fb121.zip |
fix NPE in test code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1873225 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/integrationtest/org/apache/poi/BaseIntegrationTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/integrationtest/org/apache/poi/BaseIntegrationTest.java b/src/integrationtest/org/apache/poi/BaseIntegrationTest.java index c1a49fda58..7f60dbb74b 100644 --- a/src/integrationtest/org/apache/poi/BaseIntegrationTest.java +++ b/src/integrationtest/org/apache/poi/BaseIntegrationTest.java @@ -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; } |