poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1825816 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java
Date Sun, 04 Mar 2018 13:33:21 GMT
Author: centic
Date: Sun Mar  4 13:33:20 2018
New Revision: 1825816

URL: http://svn.apache.org/viewvc?rev=1825816&view=rev
Log:
Fix compiling with current JDK 10 RC build, OOXML-Tests are still failing due to ThresholdInputStream,
though.

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java?rev=1825816&r1=1825815&r2=1825816&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java Sun Mar
 4 13:33:20 2018
@@ -31,7 +31,6 @@ import java.util.Set;
 
 import javax.xml.namespace.NamespaceContext;
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpressionException;
@@ -84,7 +83,6 @@ public class XSSFImportFromXML {
      * @param xmlInputString the XML to import
      * @throws SAXException if error occurs during XML parsing
      * @throws XPathExpressionException if error occurs during XML navigation
-     * @throws ParserConfigurationException if there are problems with XML parser configuration
      * @throws IOException  if there are problems reading the input string
      */
     public void importFromXML(String xmlInputString) throws SAXException, XPathExpressionException,
IOException {
@@ -137,15 +135,15 @@ public class XSSFImportFromXML {
 
                 Node singleNode = result.item(i).cloneNode(true);
 
-                for (XSSFTableColumn tableColum : table.getColumns()) {
+                for (XSSFTableColumn tableColumn : table.getColumns()) {
 
-                    XSSFXmlColumnPr xmlColumnPr = tableColum.getXmlColumnPr();
+                    XSSFXmlColumnPr xmlColumnPr = tableColumn.getXmlColumnPr();
                     if(xmlColumnPr == null) {
                         continue;
                     }
 
                     int rowId = rowOffset + i;
-                    int columnId = columnOffset + tableColum.getColumnIndex();
+                    int columnId = columnOffset + tableColumn.getColumnIndex();
                     String localXPath = xmlColumnPr.getLocalXPath();
                     localXPath = localXPath.substring(localXPath.indexOf('/', 1) + 1);
 
@@ -224,10 +222,7 @@ public class XSSFImportFromXML {
                     break;
                 }
             }
-        } catch (IllegalArgumentException e) {
-            throw new IllegalArgumentException(String.format(LocaleUtil.getUserLocale(),
"Unable to format value '%s' as %s for cell %s", value,
-                    type, new CellReference(cell).formatAsString()));
-        } catch (ParseException e) {
+        } catch (IllegalArgumentException | ParseException e) {
             throw new IllegalArgumentException(String.format(LocaleUtil.getUserLocale(),
"Unable to format value '%s' as %s for cell %s", value,
                     type, new CellReference(cell).formatAsString()));
         }
@@ -300,7 +295,7 @@ public class XSSFImportFromXML {
 
         // Dummy implementation - not used!
         @Override
-        public Iterator<?> getPrefixes(String val) {
+        public Iterator<String> getPrefixes(String val) {
             return null;
         }
 



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


Mime
View raw message