* if (logger.check(POILogger.INFO)) {
- * logger.log(POILogger.INFO, "Avoid concatenating " + " strings and evaluating " + functions());
+ * logger.log(POILogger.INFO, "Avoid concatenating ", " strings and evaluating ", functions());
* }
*
*
diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java b/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java
index 59e4ff5b99..01a0b21e18 100644
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java
@@ -60,8 +60,8 @@ public class SXSSFWorkbookWithCustomZipEntrySource extends SXSSFWorkbook {
@Override
protected SheetDataWriter createSheetDataWriter() throws IOException {
//log values to ensure these values are accessible to subclasses
- LOG.log(POILogger.INFO, "isCompressTempFiles: " + isCompressTempFiles());
- LOG.log(POILogger.INFO, "SharedStringSource: " + getSharedStringSource());
+ LOG.log(POILogger.INFO, "isCompressTempFiles: ", isCompressTempFiles());
+ LOG.log(POILogger.INFO, "SharedStringSource: ", getSharedStringSource());
return new SheetDataWriterWithDecorator();
}
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
index 69f704ef78..7b8526d7e0 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
@@ -111,7 +111,7 @@ public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator {
int lastFlushedRowNum = ((SXSSFSheet) sheet).getLastFlushedRowNum();
if (lastFlushedRowNum > -1) {
if (! skipOutOfWindow) throw new RowFlushedException(0);
- logger.log(POILogger.INFO, "Rows up to " + lastFlushedRowNum + " have already been flushed, skipping");
+ logger.log(POILogger.INFO, "Rows up to ", lastFlushedRowNum, " have already been flushed, skipping");
}
}
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
index 667b4ff5dc..c280784553 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
@@ -3549,14 +3549,14 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
LOG.log(POILogger.INFO, "Autosizing columns...");
for (int i = 0; i < 3; ++i) {
- LOG.log(POILogger.INFO, "Autosize " + i + " - " + Duration.between(start, Instant.now()));
+ LOG.log(POILogger.INFO, "Autosize ", i, " - ", Duration.between(start, Instant.now()));
sheet.autoSizeColumn(i);
}
for (int i = 0; i < 69 - 35 + 1; ++i)
for (int j = 0; j < 8; ++j) {
int col = 3 + 2 + i * (8 + 2) + j;
- LOG.log(POILogger.INFO, "Autosize " + col + " - " + Duration.between(start, Instant.now()));
+ LOG.log(POILogger.INFO, "Autosize ", col, " - ", Duration.between(start, Instant.now()));
sheet.autoSizeColumn(col);
}
LOG.log(POILogger.INFO, Duration.between(start, Instant.now()));
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java
index f4a4ed0319..4f2779d97b 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java
@@ -43,7 +43,7 @@ public class TestXSSFSheetMergeRegions {
if (millis < 2000) {
break;
}
- LOG.log(POILogger.INFO, "Retry " + i + " because run-time is too high: " + millis);
+ LOG.log(POILogger.INFO, "Retry ", i, " because run-time is too high: ", millis);
}
boolean inGump = false;
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java b/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
index 49bd462fdc..9c1716b571 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
@@ -242,12 +242,11 @@ public final class Chunk {
default:
logger.log(POILogger.INFO,
- "Command of type " + type + " not processed!");
+ "Command of type ", type, " not processed!");
}
}
catch (Exception e) {
- logger.log(POILogger.ERROR, "Unexpected error processing command, ignoring and continuing. Command: " +
- command, e);
+ logger.log(POILogger.ERROR, "Unexpected error processing command, ignoring and continuing. Command: ", command, e);
}
// Add to the array
diff --git a/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java b/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java
index 83e8db7598..2590fd85b9 100644
--- a/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java
+++ b/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java
@@ -601,8 +601,8 @@ public class HemfComment {
// some emf comments are truncated, so we don't use readFully here
int readBytes = leis.read(wmfData);
if (readBytes < wmfData.length) {
- logger.log(POILogger.INFO, "Emf comment with WMF: expected "+wmfData.length+
- " bytes - received only "+readBytes+" bytes.");
+ logger.log(POILogger.INFO, "Emf comment with WMF: expected ", wmfData.length,
+ " bytes - received only ", readBytes, " bytes.");
}
return leis.getReadIndex()-startIdx;
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java
index 6e8c3699a7..fff3764bb4 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java
@@ -322,7 +322,7 @@ public abstract class HSLFSimpleShape extends HSLFShape implements SimpleShape