Fix bug #51474 - SXSSF handling for null strings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143059 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-07-05 13:42:08 +00:00
parent 320a3ab737
commit a9dbb3be09
2 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@
<changes>
<release version="3.8-beta4" date="2011-??-??">
<action dev="poi-developers" type="fix">51474 - SXSSF handling for null strings</action>
<action dev="poi-developers" type="fix">48294 - Fixed HSSFWorkbook.setSheetOrder() to respect inter-sheet references </action>
<action dev="poi-developers" type="fix">51448 - Avoid exception when evaluating workbooks with more than 256 sheets </action>
<action dev="poi-developers" type="fix">51458 - Correct BitField wrapping when setting large values</action>

View File

@ -22,7 +22,6 @@ import java.util.Iterator;
import java.util.TreeMap;
import java.util.Map;
import org.apache.poi.hpsf.IllegalPropertySetDataException;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellReference;
@ -1402,6 +1401,10 @@ public class SXSSFSheet implements Sheet, Cloneable
//Taken from jdk1.3/src/javax/swing/text/html/HTMLWriter.java
protected void outputQuotedString(String s) throws IOException
{
if(s == null || s.length() == 0) {
return;
}
char[] chars=s.toCharArray();
int last = 0;
int length=s.length();