harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2475) java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified
Date Tue, 05 Dec 2006 16:37:21 GMT
java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified
--------------------------------------------------------------------------------------------------

                 Key: HARMONY-2475
                 URL: http://issues.apache.org/jira/browse/HARMONY-2475
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Anton Ivanov
            Priority: Minor


If input data is not specified and we try to call Inflater.inflate(byte[]) method DataFormatException
is thrown. RI does not throw DataFormatException in such a case.

The test to reproduce the problem:

import java.util.zip.Inflater;

public class InflaterTest  {

    public static void main(String[] args) throws InterruptedException {
        Inflater inf = new Inflater();
        byte[] ba = new byte[100];

        try {
            int length = inf.inflate(ba);
            System.out.println("PASSED");
            System.out.println("number of bytes uncompressed: " + length);
        } catch (Exception e) {
            System.out.println("FAILED");
            e.printStackTrace();
        }
    }
}

Output on Harmony:

FAILED
java.util.zip.DataFormatException:
        at java.util.zip.Inflater.inflateImpl(Native Method)
        at java.util.zip.Inflater.inflate(Inflater.java:180)
        at java.util.zip.Inflater.inflate(Inflater.java:149)
        at InflaterTest.main(InflaterTest.java:11)

Output on RI:

PASSED
number of bytes uncompressed: 0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message