[bug-65739] reduce log level of message to debug

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895794 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-12-10 21:13:01 +00:00
parent 0baf788054
commit 0f18de4b06
2 changed files with 7 additions and 12 deletions

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

View File

@ -16,19 +16,14 @@
==================================================================== */
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 );