poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1578147 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
Date Sun, 16 Mar 2014 19:46:57 GMT
Author: centic
Date: Sun Mar 16 19:46:56 2014
New Revision: 1578147

URL: http://svn.apache.org/r1578147
Log:
Bug 56195: replace System.err with propert logging

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java?rev=1578147&r1=1578146&r2=1578147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java Sun
Mar 16 19:46:56 2014
@@ -18,6 +18,8 @@ package org.apache.poi.xssf.eventusermod
 
 import org.apache.poi.ss.usermodel.BuiltinFormats;
 import org.apache.poi.ss.usermodel.DataFormatter;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.apache.poi.xssf.model.StylesTable;
 import org.apache.poi.xssf.usermodel.XSSFCellStyle;
 import org.apache.poi.xssf.usermodel.XSSFRichTextString;
@@ -31,7 +33,9 @@ import org.xml.sax.helpers.DefaultHandle
  *  row and cell events for it.
  */
 public class XSSFSheetXMLHandler extends DefaultHandler {
-   /**
+    private static final POILogger logger = POILogFactory.getLogger(XSSFSheetXMLHandler.class);
+    
+    /**
     * These are the different kinds of cells we support.
     * We keep track of the current one between
     *  the start and end.
@@ -168,7 +172,7 @@ public class XSSFSheetXMLHandler extends
                 // TODO Retrieve the shared formula and tweak it to 
                 //  match the current cell
                 if(formulasNotResults) {
-                   System.err.println("Warning - shared formulas not yet supported!");
+                    logger.log(POILogger.WARN, "shared formulas not yet supported!");
                 } else {
                    // It's a shared formula, so we can't get at the formula string yet
                    // However, they don't care about the formula string, so that's ok!
@@ -283,7 +287,7 @@ public class XSSFSheetXMLHandler extends
                        thisStr = rtss.toString();
                    }
                    catch (NumberFormatException ex) {
-                       System.err.println("Failed to parse SST index '" + sstIndex + "':
" + ex.toString());
+                       logger.log(POILogger.ERROR, "Failed to parse SST index '" + sstIndex,
ex);
                    }
                    break;
 



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


Mime
View raw message