Bug 17890: Corrected exception text for zero byte file.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@425384 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3ffa62ef21
commit
79d49c2b67
@ -72,6 +72,9 @@ public class HeaderBlockReader
|
||||
|
||||
if (byte_count != POIFSConstants.BIG_BLOCK_SIZE)
|
||||
{
|
||||
if (byte_count == -1)
|
||||
//Cant have -1 bytes read in the error message!
|
||||
byte_count = 0;
|
||||
String type = " byte" + ((byte_count == 1) ? ("")
|
||||
: ("s"));
|
||||
|
||||
|
@ -56,6 +56,10 @@ public class RawDataBlock
|
||||
}
|
||||
else if (count != POIFSConstants.BIG_BLOCK_SIZE)
|
||||
{
|
||||
if (count == -1)
|
||||
//Cant have -1 bytes read in the error message!
|
||||
count = 0;
|
||||
|
||||
String type = " byte" + ((count == 1) ? ("")
|
||||
: ("s"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user