poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1695629 - in /poi/trunk/src: java/org/apache/poi/util/Configurator.java ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
Date Thu, 13 Aug 2015 00:17:08 GMT
Author: kiwiwings
Date: Thu Aug 13 00:17:08 2015
New Revision: 1695629

URL: http://svn.apache.org/r1695629
Log:
findbugs - DM_BOXED_PRIMITIVE_...

Modified:
    poi/trunk/src/java/org/apache/poi/util/Configurator.java
    poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java
    poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java

Modified: poi/trunk/src/java/org/apache/poi/util/Configurator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/Configurator.java?rev=1695629&r1=1695628&r2=1695629&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/Configurator.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/Configurator.java Thu Aug 13 00:17:08 2015
@@ -27,7 +27,7 @@ public class Configurator {
         int result = defaultValue;
         String property = System.getProperty(systemProperty);
         try {
-            result = Integer.valueOf(property);
+            result = Integer.parseInt(property);
         } catch (Exception e) {
             logger.log(POILogger.ERROR, "System property -D"+systemProperty +" do not contains
a valid integer " + property);
         }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java?rev=1695629&r1=1695628&r2=1695629&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java Thu Aug 13 00:17:08 2015
@@ -114,7 +114,7 @@ public class TOC {
         // page number run
         run = p.addNewR();
         run.addNewRPr().addNewNoProof();
-        run.addNewT().setStringValue(Integer.valueOf(page).toString());
+        run.addNewT().setStringValue(Integer.toString(page));
         run = p.addNewR();
         run.addNewRPr().addNewNoProof();
         run.addNewFldChar().setFldCharType(STFldCharType.END);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java?rev=1695629&r1=1695628&r2=1695629&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java Thu Aug 13 00:17:08
2015
@@ -901,7 +901,7 @@ public class XWPFDocument extends POIXML
             String parStyle = par.getStyle();
             if (parStyle != null && parStyle.startsWith("Heading")) {
                 try {
-                    int level = Integer.valueOf(parStyle.substring("Heading".length())).intValue();
+                    int level = Integer.parseInt(parStyle.substring("Heading".length()));
                     toc.addRow(level, par.getText(), 1, "112723803");
                 } catch (NumberFormatException e) {
                     e.printStackTrace();



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


Mime
View raw message