Skip to content

Commit

Permalink
fix Unnecessary cast (int)
Browse files Browse the repository at this point in the history
  • Loading branch information
mprins committed Apr 25, 2024
1 parent 7636d7f commit a5285f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public int read() throws IOException {
if (0 != fCharCount) {
fCharCount--;

return ((int) fCharBuf[fCharCount]) & 0xFFFF;
return (fCharBuf[fCharCount]) & 0xFFFF;
}

int b0 = fInputStream.read() & 0xff; // 1st byte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ public static Reader getCharsetAwareReader(InputStream istream, EncodingInfo enc
// But using StringBuffer will make this uglier, not?
LOGGER.finer(
"First 4 bytes of XML doc are : "
+ Integer.toHexString((int) b4[0] & 0xff).toUpperCase()
+ Integer.toHexString(b4[0] & 0xff).toUpperCase()
+ " ('"
+ (char) b4[0]
+ "') "
+ Integer.toHexString((int) b4[1] & 0xff).toUpperCase()
+ Integer.toHexString(b4[1] & 0xff).toUpperCase()
+ " ('"
+ (char) b4[1]
+ "') "
+ Integer.toHexString((int) b4[2] & 0xff).toUpperCase()
+ Integer.toHexString(b4[2] & 0xff).toUpperCase()
+ " ('"
+ (char) b4[2]
+ "') "
+ Integer.toHexString((int) b4[3] & 0xff).toUpperCase()
+ Integer.toHexString(b4[3] & 0xff).toUpperCase()
+ " ('"
+ (char) b4[3]
+ "')");
Expand Down

0 comments on commit a5285f0

Please sign in to comment.