My favorites | Sign in
Google
          
New issue | Search
for
| Advanced search | Search tips
Issue 200: Adler32 produces different results when calling update(byte[]) vs update(byte)
1 person starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Mar 2008
Cc:  Brett.Chabot
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by charles.lamb, Feb 07, 2008
The following program should produce the same result, but doesn't.  I have
verified that this program works ok on a standard Sun JVM as well as on the
off-the-shelf Harmony JVM.

Feel free to contact me if you have any questions.

Charles Lamb
charles.lamb  @@@@ oracle.com

import java.util.zip.Adler32;
import java.util.zip.Checksum;

public class Blort {

    public static void main(String argv[]) {
    Checksum cksum = new Adler32();
    byte[] ba = new byte[] { 1, 2, 3, 4 };
    cksum.update(ba, 0, 2);
    cksum.update(ba, 2, 2);
    System.out.println("cksum 1: " + cksum.getValue());

    cksum = new Adler32();
    cksum.update(ba, 0, 4);
    System.out.println("cksum 2: " + cksum.getValue());
    }
}
Comment 1 by morrildl, Feb 07, 2008
This Issue has been reviewed and accepted.
An engineer will be assigned to work on it according to its priority.
Status: Reviewed
Comment 2 by Brett.Chabot, Mar 10, 2008
This issue has been fixed in the m5 release of the Android SDK.
Status: Released
Comment 3 by Brett.Chabot, May 05, 2008
(No comment was entered for this change.)
Cc: Brett.Chabot
Sign in to add a comment