From 8ab62e71492d0203ae7f942c5cb320e81f6da10c Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Thu, 23 Jun 2022 17:02:10 +0200 Subject: [PATCH] ByteUtils: fix redundant type casts --- core/src/main/java/org/bitcoinj/base/utils/ByteUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/base/utils/ByteUtils.java b/core/src/main/java/org/bitcoinj/base/utils/ByteUtils.java index 415d78642..c93c27287 100644 --- a/core/src/main/java/org/bitcoinj/base/utils/ByteUtils.java +++ b/core/src/main/java/org/bitcoinj/base/utils/ByteUtils.java @@ -114,14 +114,14 @@ public class ByteUtils { /** Write 2 bytes to the output stream as unsigned 16-bit integer in little endian format. */ public static void uint16ToByteStreamLE(int val, OutputStream stream) throws IOException { - stream.write((int) (0xFF & val)); - stream.write((int) (0xFF & (val >> 8))); + stream.write(0xFF & val); + stream.write(0xFF & (val >> 8)); } /** Write 2 bytes to the output stream as unsigned 16-bit integer in big endian format. */ public static void uint16ToByteStreamBE(int val, OutputStream stream) throws IOException { - stream.write((int) (0xFF & (val >> 8))); - stream.write((int) (0xFF & val)); + stream.write(0xFF & (val >> 8)); + stream.write(0xFF & val); } /** Write 4 bytes to the output stream as unsigned 32-bit integer in little endian format. */