You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anton Ivanov (JIRA)" <ji...@apache.org> on 2006/12/05 17:37:21 UTC

[jira] Created: (HARMONY-2475) java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified

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

        

[jira] Commented: (HARMONY-2475) [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467233 ] 

Tony Wu commented on HARMONY-2475:
----------------------------------

I can not reproduce it on both winxp sp2 and ubuntu with latest classlib. 
Maybe it is not a bug now.

> [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2475
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2475) [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2475?page=all ]

Alexei Zakharov updated HARMONY-2475:
-------------------------------------

    Summary: [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified  (was: java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified)

> [classlib][archive] 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

        

[jira] Closed: (HARMONY-2475) [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang closed HARMONY-2475.
--------------------------------

    Resolution: Cannot Reproduce

Cannot reproduce in r537286

> [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2475
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2475) [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified

Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494236 ] 

Mikhail Markov commented on HARMONY-2475:
-----------------------------------------

I also could not reproduce it on latest svn snapshot.
+1 to close the issue.

> [classlib][archive] java.util.zip.Inflater.inflate(byte[]) throws DataFormatException when input data is not specified
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2475
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.