findbugs - DM_BOXED_PRIMITIVE_...

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695629 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2015-08-13 00:17:08 +00:00
parent 14df4b2824
commit 3ac2d2905a
3 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -901,7 +901,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
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();