]> source.dussan.org Git - poi.git/commitdiff
[bug-65739] reduce log level of message to debug
authorPJ Fanning <fanningpj@apache.org>
Fri, 10 Dec 2021 21:13:01 +0000 (21:13 +0000)
committerPJ Fanning <fanningpj@apache.org>
Fri, 10 Dec 2021 21:13:01 +0000 (21:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895794 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java
poi/src/main/java/org/apache/poi/hpsf/CodePageString.java

index 4c1bf83e5492ef2022da8d9fe5c60921589ad8a4..f3ce643603db6003ee85ba030733f79a32f67855 100644 (file)
@@ -238,7 +238,7 @@ class TestXWPFBugs {
 
             assertThrows(NullPointerException.class,
                     () -> styles.getUsedStyleList(null),
-                    "Pasisng in 'null' triggers an exception");
+                    "Passing in 'null' triggers an exception");
 
             XWPFStyle style = doc.getStyles().getStyle("TableauGrille41");
             doc.getStyles().getUsedStyleList(style);
index 44fde36a216ad461afd9d6b341870304f77db23b..3217211b8f6e3f977d7ccac20fd476047e49b9d5 100644 (file)
 ==================================================================== */
 package org.apache.poi.hpsf;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.poi.util.*;
+
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.poi.util.CodePageUtil;
-import org.apache.poi.util.IOUtils;
-import org.apache.poi.util.Internal;
-import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.LittleEndianByteArrayInputStream;
-import org.apache.poi.util.LittleEndianConsts;
-
 import static org.apache.logging.log4j.util.Unbox.box;
 
 @Internal
@@ -91,11 +86,11 @@ public class CodePageString {
         final int terminator = result.indexOf( '\0' );
         if ( terminator == -1 ) {
             LOG.atWarn().log("String terminator (\\0) for CodePageString property value not found. " +
-            "Continue without trimming and hope for the best.");
+                    "Continue without trimming and hope for the best.");
             return result;
         }
         if ( terminator != result.length() - 1 ) {
-            LOG.atWarn().log("String terminator (\\0) for CodePageString property value occurred before the end of " +
+            LOG.atDebug().log("String terminator (\\0) for CodePageString property value occurred before the end of " +
                     "string. Trimming and hope for the best.");
         }
         return result.substring( 0, terminator );