diff options
author | darcy <none@none> | 2012-02-07 17:39:13 -0800 |
---|---|---|
committer | darcy <none@none> | 2012-02-07 17:39:13 -0800 |
commit | 0effbc7e894710e4f5318ce6491f7abd6dfd9ce0 (patch) | |
tree | 20ba259011bfc75d3325efacf1019f9e8e20e41f /src/share/demo/nio | |
parent | 242156dcea3cd2f9c7bd6e5e1fc8611ebd3608fb (diff) | |
download | jdk8u_jdk-0effbc7e894710e4f5318ce6491f7abd6dfd9ce0.tar.gz |
7143629: JDK jar/zip code should use unsigned library support
Reviewed-by: sherman
Diffstat (limited to 'src/share/demo/nio')
-rw-r--r-- | src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java index dd15bf87e6..0fab957b37 100644 --- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java +++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java @@ -185,11 +185,11 @@ class ZipConstants { */ /////////////////////////////////////////////////////// static final int CH(byte[] b, int n) { - return b[n] & 0xff; + return Byte.toUnsignedInt(b[n]); } static final int SH(byte[] b, int n) { - return (b[n] & 0xff) | ((b[n + 1] & 0xff) << 8); + return Byte.toUnsignedInt(b[n]) | (Byte.toUnsignedInt(b[n + 1]) << 8); } static final long LG(byte[] b, int n) { |