Pārlūkot izejas kodu

If there's no more data but there ought to be for unicode strings, in a partly corrupt file, give a warning and substitute in empty strings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@900745 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_3_7_BETA1
Nick Burch pirms 14 gadiem
vecāks
revīzija
d7470746e1

+ 7
- 1
src/java/org/apache/poi/hssf/record/SSTDeserializer.java Parādīt failu

@@ -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 );
}
}

Notiek ielāde…
Atcelt
Saglabāt