From 6f606cabdaa82f15b4e3e17c4ced3ee2943272b8 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Mon, 30 Jan 2023 12:19:43 +0000 Subject: [PATCH] Spotbugs: Replace \n with %n in String.format() git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907110 13f79535-47bb-0310-9956-ffa450edef68 --- poi/src/main/java/org/apache/poi/util/IOUtils.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/poi/src/main/java/org/apache/poi/util/IOUtils.java b/poi/src/main/java/org/apache/poi/util/IOUtils.java index 7c8427bcfe..9988c429cc 100644 --- a/poi/src/main/java/org/apache/poi/util/IOUtils.java +++ b/poi/src/main/java/org/apache/poi/util/IOUtils.java @@ -597,17 +597,17 @@ public final class IOUtils { private static void throwRFE(long length, int maxLength) { throw new RecordFormatException(String.format(Locale.ROOT, "Tried to allocate an array of length %,d" + - ", but the maximum length for this record type is %,d.\n" + - "If the file is not corrupt and not large, please open an issue on bugzilla to request \n" + - "increasing the maximum allowable size for this record type.\n"+ + ", but the maximum length for this record type is %,d.%n" + + "If the file is not corrupt and not large, please open an issue on bugzilla to request %n" + + "increasing the maximum allowable size for this record type.%n"+ "You can set a higher override value with IOUtils.setByteArrayMaxOverride()", length, maxLength)); } private static void throwRecordTruncationException(final int maxLength) { throw new RecordFormatException(String.format(Locale.ROOT, "Tried to read data but the maximum length " + - "for this record type is %,d.\n" + - "If the file is not corrupt and not large, please open an issue on bugzilla to request \n" + - "increasing the maximum allowable size for this record type.\n"+ + "for this record type is %,d.%n" + + "If the file is not corrupt and not large, please open an issue on bugzilla to request %n" + + "increasing the maximum allowable size for this record type.%n"+ "You can set a higher override value with IOUtils.setByteArrayMaxOverride()", maxLength)); } } -- 2.39.5