harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6133) [classlib][luni] java.io.BufferedInputStream.skip(0) shouldn't throw IOException
Date Fri, 27 Mar 2009 02:54:50 GMT
[classlib][luni] java.io.BufferedInputStream.skip(0) shouldn't throw IOException

                 Key: HARMONY-6133
                 URL: https://issues.apache.org/jira/browse/HARMONY-6133
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M8
            Reporter: Kevin Zhou
             Fix For: 5.0M9

Given a test case [1], HY throws a java.lang.IOException [2], while RI passes this test.

Create a BufferedInputStream object using a null InputStream, java.io.BufferedInputStream.skip(0)
should not throw IOException. 
While at this case, java.io.BufferedInputStream.skip(Value > 0) should throw IOException.

[1] Test Case :
public void test_skip_scenario1() throws IOException {
    BufferedInputStream buf = new BufferedInputStream(null, 5);
    assertEquals(0, buf.skip(0));

public void test_skip_scenario2() throws IOException {
    BufferedInputStream buf = new BufferedInputStream(null, 5);
    try {
        fail("should throw IOException");
    } catch (IOException e) {
        // Expected

[2] Stack Trace:
java.io.IOException: Stream is closed
at java.io.BufferedInputStream.skip(BufferedInputStream.java:346)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message