diff options
author | Axel Howind <axh@apache.org> | 2024-02-22 20:56:03 +0000 |
---|---|---|
committer | Axel Howind <axh@apache.org> | 2024-02-22 20:56:03 +0000 |
commit | 05af0e0bf323daf3867be34350c1d4e44535c79f (patch) | |
tree | 3cb31e657a37b72b89fd845f07354bcdbf791bcf /poi | |
parent | 17c6a1ec509ad6bae26145d42c842035ac665c59 (diff) | |
download | poi-05af0e0bf323daf3867be34350c1d4e44535c79f.tar.gz poi-05af0e0bf323daf3867be34350c1d4e44535c79f.zip |
Math.toIntExact is unnecessary because value is guaranteed to be between 0 and 15
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915959 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/main/java/org/apache/poi/util/HexDump.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/util/HexDump.java b/poi/src/main/java/org/apache/poi/util/HexDump.java index f3ce580e4e..a9a48c6836 100644 --- a/poi/src/main/java/org/apache/poi/util/HexDump.java +++ b/poi/src/main/java/org/apache/poi/util/HexDump.java @@ -294,7 +294,7 @@ public final class HexDump { char[] buf = new char[nDigits]; long acc = value; for(int i=nDigits-1; i>=0; i--) { - int digit = Math.toIntExact(acc & 0x0F); + int digit = (int) (acc & 0x0F); buf[i] = (char) (digit < 10 ? ('0' + digit) : ('A' + digit - 10)); acc >>>= 4; } |