jdk/src/share/classes/java/util/jar/JarOutputStream.java
changeset 11828 590711df7828
parent 5506 202f599c92aa
--- a/jdk/src/share/classes/java/util/jar/JarOutputStream.java	Tue Feb 07 13:28:32 2012 +0000
+++ b/jdk/src/share/classes/java/util/jar/JarOutputStream.java	Tue Feb 07 17:39:13 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -135,7 +135,7 @@
      * The bytes are assumed to be in Intel (little-endian) byte order.
      */
     private static int get16(byte[] b, int off) {
-        return (b[off] & 0xff) | ((b[off+1] & 0xff) << 8);
+        return Byte.toUnsignedInt(b[off]) | ( Byte.toUnsignedInt(b[off+1]) << 8);
     }
 
     /*