aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorAxel Howind <axh@apache.org>2024-02-21 21:28:04 +0000
committerAxel Howind <axh@apache.org>2024-02-21 21:28:04 +0000
commit39a1ced25e6b5d3f600472d692702ec7ca01829b (patch)
tree3e8fb0bf5445785d23ad684876788f1b7f7905a7 /poi-ooxml
parentcb10857970c5013b133ec1cf3b625126e387bdfb (diff)
downloadpoi-39a1ced25e6b5d3f600472d692702ec7ca01829b.tar.gz
poi-39a1ced25e6b5d3f600472d692702ec7ca01829b.zip
fix Logging issues:
- don't use foreign class in Logger initialization - update log statements to use MessageFormat syntax git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915930 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java4
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java4
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java
index fbc5781fdd..f87c0bdd7a 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java
@@ -119,7 +119,7 @@ public class ZipSecureFile extends ZipFile {
if (maxEntrySize < 0) {
throw new IllegalArgumentException("Max entry size must be greater than or equal to zero");
} else if (maxEntrySize > DEFAULT_MAX_ENTRY_SIZE) {
- LOG.atWarn().log("setting max entry size greater than 4Gb can be risky; set to " + maxEntrySize + " bytes");
+ LOG.warn("setting max entry size greater than 4Gb can be risky; set to {} bytes", maxEntrySize);
}
MAX_ENTRY_SIZE = maxEntrySize;
}
@@ -183,7 +183,7 @@ public class ZipSecureFile extends ZipFile {
if (maxTextSize < 0) {
throw new IllegalArgumentException("Max text size must be greater than or equal to zero");
}else if (maxTextSize > DEFAULT_MAX_TEXT_SIZE) {
- LOG.atWarn().log("setting max text size greater than " + DEFAULT_MAX_TEXT_SIZE + " can be risky; set to " + maxTextSize + " chars");
+ LOG.warn("setting max text size greater than {} can be risky; set to {} chars", DEFAULT_MAX_TEXT_SIZE, maxTextSize);
}
MAX_TEXT_SIZE = maxTextSize;
}
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
index c8e92fea64..ae2ae1c12c 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
@@ -170,8 +170,8 @@ public abstract class XDDFChartData {
if (categoryData != null && values != null) {
int numOfPoints = category.getPointCount();
if (numOfPoints != values.getPointCount()) {
- LOGGER.warn("Category and values must have the same point count, but had " +
- numOfPoints + " categories and " + values.getPointCount() + " values.");
+ LOGGER.warn("Category and values must have the same point count, but had {}" +
+ " categories and {} values.", numOfPoints, values.getPointCount());
}
}
this.categoryData = category;
diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java
index ce63f811a8..6af8b2c1f3 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java
@@ -44,7 +44,7 @@ class TestRelationships {
private static final String SHEET_WITH_COMMENTS =
"/xl/worksheets/sheet1.xml";
- private static final Logger LOG = LogManager.getLogger(TestPackageCoreProperties.class);
+ private static final Logger LOG = LogManager.getLogger(TestRelationships.class);
/**
* Test relationships are correctly loaded. This at the moment fails (as of r499)