git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@900745 13f79535-47bb-0310-9956-ffa450edef68tags/REL_3_7_BETA1
@@ -47,7 +47,13 @@ class SSTDeserializer | |||
{ | |||
for (int i=0;i<stringCount;i++) { | |||
// Extract exactly the count of strings from the SST record. | |||
UnicodeString str = new UnicodeString(in); | |||
UnicodeString str; | |||
if(in.available() == 0 && ! in.hasNextRecord()) { | |||
System.err.println("Ran out of data before creating all the strings! String at index " + i + ""); | |||
str = new UnicodeString(""); | |||
} else { | |||
str = new UnicodeString(in); | |||
} | |||
addToStringTable( strings, str ); | |||
} | |||
} |