From 9700b7def197b83e07791e885391d85a0bdb8abb Mon Sep 17 00:00:00 2001 From: Topher Lamey Date: Tue, 21 Jun 2011 14:13:54 -0600 Subject: [PATCH] Changes for protobuf support --- classpath/java/util/zip/CRC32.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classpath/java/util/zip/CRC32.java b/classpath/java/util/zip/CRC32.java index 047ee685af..628167725b 100644 --- a/classpath/java/util/zip/CRC32.java +++ b/classpath/java/util/zip/CRC32.java @@ -15,7 +15,7 @@ public class CRC32 { private static final int Width = 32; private static final int Top = 1 << (Width - 1); private static final int InitialRemainder = 0xFFFFFFFF; - private static final int ResultXor = 0xFFFFFFFF; + private static final long ResultXor = 0xFFFFFFFFL; private static final int[] table = new int[256]; @@ -53,7 +53,7 @@ public class CRC32 { } public long getValue() { - return reflect(remainder, Width) ^ ResultXor; + return (reflect(remainder, Width) ^ ResultXor) & 0xFFFFFFFFL; } private static int reflect(int x, int n) {