]> source.dussan.org Git - poi.git/commitdiff
Bugzilla 53271 - Removed unconditional asserts in SXSSF
authorYegor Kozlov <yegor@apache.org>
Fri, 25 May 2012 12:53:12 +0000 (12:53 +0000)
committerYegor Kozlov <yegor@apache.org>
Fri, 25 May 2012 12:53:12 +0000 (12:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1342604 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/status.xml
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java

index d73559ac5431684838743a0216ecb29283819ee8..b2c7083a8b01bea3aecb06430e28e1bb2fecff83 100644 (file)
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.9-beta1" date="2012-??-??">
+          <action dev="poi-developers" type="fix">53271 - Removed unconditional asserts in SXSSF</action>
           <action dev="poi-developers" type="add">53025 - Updatad documentation and example on using Data Validations  </action>
           <action dev="poi-developers" type="add">53227 - Corrected AddDimensionedImage.java to support XSSF/SXSSF  </action>
           <action dev="poi-developers" type="add">53058 - Utility for representing drawings contained in a binary Excel file as a XML tree</action>
index bd57fc3ded4bb2251bb72f461edc53f16437fc60..46ca95fcf771ca27e57b9f4628d79ea0d0900299 100644 (file)
@@ -728,10 +728,6 @@ public class SXSSFCell implements Cell
     }
     void ensureTypeOrFormulaType(int type)
     {
-        assert type==CELL_TYPE_NUMERIC||
-               type==CELL_TYPE_STRING||
-               type==CELL_TYPE_BOOLEAN||
-               type==CELL_TYPE_ERROR;
         if(_value.getType()==type)
         {
             if(type==CELL_TYPE_STRING&&((StringValue)_value).isRichText())
index 1bd53bc8b29e6d006a6c8bc5408851459044b469..a762de822b7862d7fdf2fdbac8c6e654a71b2d27 100644 (file)
@@ -212,7 +212,6 @@ public class SXSSFRow implements Row
      */
     public Cell getCell(int cellnum, MissingCellPolicy policy)
     {
-        assert false;
         Cell cell = getCell(cellnum);
         if(policy == RETURN_NULL_AND_BLANK)
         {
index afe8612002db59e0b35c11d217048f6918a1b2da..5eb3338afb4ec2bb6a2858f54e7590b154fb35c6 100644 (file)
@@ -1330,7 +1330,6 @@ public class SXSSFSheet implements Sheet, Cloneable
             if(entry.getValue()==row)
                 return entry.getKey().intValue();
         }
-        assert false;
         return -1;
     }
 }
index a79f1aad0271d1449762639aa1b9f63e2d854a77..056dca313f5bb412355aea33e355581e1eb45233 100644 (file)
@@ -244,7 +244,6 @@ public class SXSSFWorkbook implements Workbook
     XSSFSheet getXSSFSheet(SXSSFSheet sheet)
     {
         XSSFSheet result=_sxFromXHash.get(sheet);
-        assert result!=null;
         return result;
     }
 
@@ -543,7 +542,6 @@ public class SXSSFWorkbook implements Workbook
      */
     public int getSheetIndex(Sheet sheet)
     {
-        assert sheet instanceof SXSSFSheet;
         return _wb.getSheetIndex(getXSSFSheet((SXSSFSheet)sheet));
     }
 
index 1823fec798e91fd9f8e78967521fdf74ae9c907c..521f9d56eeba744d5b65a688c80673d582ce101c 100644 (file)
@@ -204,7 +204,6 @@ public class SheetDataWriter {
                 break;\r
             }\r
             default: {\r
-                assert false;\r
                 throw new RuntimeException("Huh?");\r
             }\r
         }\r