mirror of https://github.com/apache/poi.git
return better error message when ZipEntry has no data (it was closed before the data was retrieved)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894831 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
336bce7c82
commit
5a59376389
|
@ -88,8 +88,10 @@ import org.apache.poi.util.TempFile;
|
|||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException("temp file " + tempFile.getAbsolutePath() + " is missing");
|
||||
}
|
||||
} else {
|
||||
} else if (data != null) {
|
||||
return new UnsynchronizedByteArrayInputStream(data);
|
||||
} else {
|
||||
throw new RuntimeException("Cannot retrieve data from Zip Entry, probably because the Zip Entry was closed before the data was requested.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue