poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1744636 - in /poi/trunk/src/ooxml: java/org/apache/poi/POIXMLTypeLoader.java java/org/apache/poi/xssf/streaming/SXSSFRow.java testcases/org/apache/poi/ss/usermodel/BaseTestXCell.java
Date Thu, 19 May 2016 20:18:19 GMT
Author: centic
Date: Thu May 19 20:18:19 2016
New Revision: 1744636

URL: http://svn.apache.org/viewvc?rev=1744636&view=rev
Log:
Fix some compiler warnings, close resources in tests

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/ss/usermodel/BaseTestXCell.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java?rev=1744636&r1=1744635&r2=1744636&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java Thu May 19 20:18:19 2016
@@ -77,8 +77,7 @@ public class POIXMLTypeLoader {
     }
     
     private static XmlOptions getXmlOptions(XmlOptions options) {
-        XmlOptions opt = (options == null) ? DEFAULT_XML_OPTIONS : options;
-        return opt;
+        return options == null ? DEFAULT_XML_OPTIONS : options;
     }
 
     public static XmlObject newInstance(SchemaType type, XmlOptions options) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java?rev=1744636&r1=1744635&r2=1744636&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java Thu May 19 20:18:19
2016
@@ -55,7 +55,7 @@ public class SXSSFRow implements Row, Co
      * @param initialSize - no longer needed
      * @deprecated 2015-11-30 (circa POI 3.14beta1). Use {@link #SXSSFRow(SXSSFSheet)} instead.
      */
-    public SXSSFRow(SXSSFSheet sheet, int initialSize)
+    public SXSSFRow(SXSSFSheet sheet, @SuppressWarnings("UnusedParameters") int initialSize)
     {
         this(sheet);
     }
@@ -433,7 +433,6 @@ public class SXSSFRow implements Row, Co
     public void setRowStyle(CellStyle style) {
        if(style == null) {
           _style = -1;
-          return;
        } else {
           _style = style.getIndex();
        }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/ss/usermodel/BaseTestXCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/ss/usermodel/BaseTestXCell.java?rev=1744636&r1=1744635&r2=1744636&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/ss/usermodel/BaseTestXCell.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/ss/usermodel/BaseTestXCell.java Thu May 19
20:18:19 2016
@@ -59,7 +59,7 @@ public abstract class BaseTestXCell exte
     }
 
     @Test
-    public void testSetNullValues() {
+    public void testSetNullValues() throws IOException {
         Workbook wb = _testDataProvider.createWorkbook();
         Cell cell = wb.createSheet("test").createRow(0).createCell(0);
 
@@ -68,5 +68,7 @@ public abstract class BaseTestXCell exte
         cell.setCellValue((String)null);
         cell.setCellValue((RichTextString) null);
         cell.setCellValue((String)null);
+
+        wb.close();
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message