You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Artem Aliev (JIRA)" <ji...@apache.org> on 2006/12/04 12:44:24 UTC
[jira] Created: (HARMONY-2407) java.io.BufferedInputStream(null,9)
returns another internal buffer that RI
java.io.BufferedInputStream(null,9) returns another internal buffer that RI
---------------------------------------------------------------------------
Key: HARMONY-2407
URL: http://issues.apache.org/jira/browse/HARMONY-2407
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Artem Aliev
Priority: Minor
Compatibility issue.
According to the specification "protected volatile byte[] buf - The internal
buffer array where the data is stored. When necessary, it may be replaced by
another array of a different size".
Harmony returns for BufferedInputStream(InputStream in, int size) buf==null if
in==null. RI returns non-null buf with length==size.
Test for reproducing:
import junit.framework.TestCase;
import java.io.*;
public class test extends TestCase {
public void test1 () {
try {
testBufferedInputStream obj=new testBufferedInputStream(null,9);
assertEquals(9,testBufferedInputStream.buf.length);
} catch (IOException e) {
fail("Unexpected IOException");
}
}
}
class testBufferedInputStream extends BufferedInputStream {
static byte[] buf;
testBufferedInputStream(InputStream is, int size) throws IOException {
super(is, size);
buf=super.buf;
}
}
Output on Sun 1.5:
==================
.
Time: 0
OK (1 test)
Output on Harmony:
==================
.E
Time: 0.015
There was 1 error:
1) test1(test)java.lang.NullPointerException
at test.test1(test.java:8)
at java.lang.reflect.VMReflection.invokeMethod(Native Method)
--
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] Updated: (HARMONY-2407) [classlib][luni]
java.io.BufferedInputStream(null,9) returns another internal buffer that RI
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2407?page=all ]
Alexei Zakharov updated HARMONY-2407:
-------------------------------------
Summary: [classlib][luni] java.io.BufferedInputStream(null,9) returns another internal buffer that RI (was: java.io.BufferedInputStream(null,9) returns another internal buffer that RI)
adding [classlib][luni] prefix to summary
> [classlib][luni] java.io.BufferedInputStream(null,9) returns another internal buffer that RI
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-2407
> URL: http://issues.apache.org/jira/browse/HARMONY-2407
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Artem Aliev
> Priority: Minor
>
> Compatibility issue.
> According to the specification "protected volatile byte[] buf - The internal
> buffer array where the data is stored. When necessary, it may be replaced by
> another array of a different size".
> Harmony returns for BufferedInputStream(InputStream in, int size) buf==null if
> in==null. RI returns non-null buf with length==size.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.io.*;
> public class test extends TestCase {
> public void test1 () {
> try {
> testBufferedInputStream obj=new testBufferedInputStream(null,9);
> assertEquals(9,testBufferedInputStream.buf.length);
> } catch (IOException e) {
> fail("Unexpected IOException");
> }
> }
> }
> class testBufferedInputStream extends BufferedInputStream {
> static byte[] buf;
> testBufferedInputStream(InputStream is, int size) throws IOException {
> super(is, size);
> buf=super.buf;
> }
> }
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.015
> There was 1 error:
> 1) test1(test)java.lang.NullPointerException
> at test.test1(test.java:8)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
--
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-2407) [classlib][luni]
java.io.BufferedInputStream(null,9) returns another internal buffer that RI
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison closed HARMONY-2407.
--------------------------------
No response, assuming ok.
> [classlib][luni] java.io.BufferedInputStream(null,9) returns another internal buffer that RI
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-2407
> URL: https://issues.apache.org/jira/browse/HARMONY-2407
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Artem Aliev
> Assigned To: Tim Ellison
> Priority: Minor
> Attachments: harmony-2407.diff
>
>
> Compatibility issue.
> According to the specification "protected volatile byte[] buf - The internal
> buffer array where the data is stored. When necessary, it may be replaced by
> another array of a different size".
> Harmony returns for BufferedInputStream(InputStream in, int size) buf==null if
> in==null. RI returns non-null buf with length==size.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.io.*;
> public class test extends TestCase {
> public void test1 () {
> try {
> testBufferedInputStream obj=new testBufferedInputStream(null,9);
> assertEquals(9,testBufferedInputStream.buf.length);
> } catch (IOException e) {
> fail("Unexpected IOException");
> }
> }
> }
> class testBufferedInputStream extends BufferedInputStream {
> static byte[] buf;
> testBufferedInputStream(InputStream is, int size) throws IOException {
> super(is, size);
> buf=super.buf;
> }
> }
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.015
> There was 1 error:
> 1) test1(test)java.lang.NullPointerException
> at test.test1(test.java:8)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-2407) [classlib][luni]
java.io.BufferedInputStream(null,9) returns another internal buffer that RI
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison reassigned HARMONY-2407:
------------------------------------
Assignee: Tim Ellison
> [classlib][luni] java.io.BufferedInputStream(null,9) returns another internal buffer that RI
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-2407
> URL: http://issues.apache.org/jira/browse/HARMONY-2407
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Artem Aliev
> Assigned To: Tim Ellison
> Priority: Minor
> Attachments: harmony-2407.diff
>
>
> Compatibility issue.
> According to the specification "protected volatile byte[] buf - The internal
> buffer array where the data is stored. When necessary, it may be replaced by
> another array of a different size".
> Harmony returns for BufferedInputStream(InputStream in, int size) buf==null if
> in==null. RI returns non-null buf with length==size.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.io.*;
> public class test extends TestCase {
> public void test1 () {
> try {
> testBufferedInputStream obj=new testBufferedInputStream(null,9);
> assertEquals(9,testBufferedInputStream.buf.length);
> } catch (IOException e) {
> fail("Unexpected IOException");
> }
> }
> }
> class testBufferedInputStream extends BufferedInputStream {
> static byte[] buf;
> testBufferedInputStream(InputStream is, int size) throws IOException {
> super(is, size);
> buf=super.buf;
> }
> }
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.015
> There was 1 error:
> 1) test1(test)java.lang.NullPointerException
> at test.test1(test.java:8)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
--
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] Resolved: (HARMONY-2407) [classlib][luni]
java.io.BufferedInputStream(null,9) returns another internal buffer that RI
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-2407.
----------------------------------
Resolution: Fixed
Thanks Artem / Tony.
Patch applied to LUNI module at repo revision r491792.
Please check that the patch was applied as you expected.
> [classlib][luni] java.io.BufferedInputStream(null,9) returns another internal buffer that RI
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-2407
> URL: http://issues.apache.org/jira/browse/HARMONY-2407
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Artem Aliev
> Assigned To: Tim Ellison
> Priority: Minor
> Attachments: harmony-2407.diff
>
>
> Compatibility issue.
> According to the specification "protected volatile byte[] buf - The internal
> buffer array where the data is stored. When necessary, it may be replaced by
> another array of a different size".
> Harmony returns for BufferedInputStream(InputStream in, int size) buf==null if
> in==null. RI returns non-null buf with length==size.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.io.*;
> public class test extends TestCase {
> public void test1 () {
> try {
> testBufferedInputStream obj=new testBufferedInputStream(null,9);
> assertEquals(9,testBufferedInputStream.buf.length);
> } catch (IOException e) {
> fail("Unexpected IOException");
> }
> }
> }
> class testBufferedInputStream extends BufferedInputStream {
> static byte[] buf;
> testBufferedInputStream(InputStream is, int size) throws IOException {
> super(is, size);
> buf=super.buf;
> }
> }
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.015
> There was 1 error:
> 1) test1(test)java.lang.NullPointerException
> at test.test1(test.java:8)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
--
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] Updated: (HARMONY-2407) [classlib][luni]
java.io.BufferedInputStream(null,9) returns another internal buffer that RI
Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2407?page=all ]
Tony Wu updated HARMONY-2407:
-----------------------------
Attachment: harmony-2407.diff
would you please try my patch, thanks a lot.
> [classlib][luni] java.io.BufferedInputStream(null,9) returns another internal buffer that RI
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-2407
> URL: http://issues.apache.org/jira/browse/HARMONY-2407
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Artem Aliev
> Priority: Minor
> Attachments: harmony-2407.diff
>
>
> Compatibility issue.
> According to the specification "protected volatile byte[] buf - The internal
> buffer array where the data is stored. When necessary, it may be replaced by
> another array of a different size".
> Harmony returns for BufferedInputStream(InputStream in, int size) buf==null if
> in==null. RI returns non-null buf with length==size.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.io.*;
> public class test extends TestCase {
> public void test1 () {
> try {
> testBufferedInputStream obj=new testBufferedInputStream(null,9);
> assertEquals(9,testBufferedInputStream.buf.length);
> } catch (IOException e) {
> fail("Unexpected IOException");
> }
> }
> }
> class testBufferedInputStream extends BufferedInputStream {
> static byte[] buf;
> testBufferedInputStream(InputStream is, int size) throws IOException {
> super(is, size);
> buf=super.buf;
> }
> }
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.015
> There was 1 error:
> 1) test1(test)java.lang.NullPointerException
> at test.test1(test.java:8)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
--
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