diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-02-21 23:31:58 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-02-21 23:31:58 +0000 |
commit | ac56bc174e85292b7cf8e25a1bcfb427e8a6d6d3 (patch) | |
tree | aa0e6efe5e50c91a7720efb086c2125a8fa5353c | |
parent | 8fc59014fe749639d2a9e06b355b54eea1e3fa49 (diff) | |
download | poi-ac56bc174e85292b7cf8e25a1bcfb427e8a6d6d3.tar.gz poi-ac56bc174e85292b7cf8e25a1bcfb427e8a6d6d3.zip |
refactor IOUtils.toByteArray
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898291 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi/src/main/java/org/apache/poi/util/IOUtils.java | 2 |
1 files changed, 1 insertions, 1 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 9268d162d3..c47efc7044 100644 --- a/poi/src/main/java/org/apache/poi/util/IOUtils.java +++ b/poi/src/main/java/org/apache/poi/util/IOUtils.java @@ -196,7 +196,7 @@ public final class IOUtils { if (length < 0 || maxLength < 0) { throw new RecordFormatException("Can't allocate an array of length < 0"); } - final int derivedMaxLength = BYTE_ARRAY_MAX_OVERRIDE <= 0 ? maxLength : Math.max(maxLength, BYTE_ARRAY_MAX_OVERRIDE); + final int derivedMaxLength = Math.max(maxLength, BYTE_ARRAY_MAX_OVERRIDE); if ((length != Integer.MAX_VALUE) || (derivedMaxLength != Integer.MAX_VALUE)) { checkLength(length, derivedMaxLength); } |