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

[jira] Created: (HARMONY-2641) [classlib][awt] Compatibility: java.awt.image.DataBufferByte(int,int) does not throw ArrayIndexOutOfBoundsException on Harmony while it does on RI

[classlib][awt] Compatibility: java.awt.image.DataBufferByte(int,int) does not throw ArrayIndexOutOfBoundsException on Harmony while it does on RI
--------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2641
                 URL: http://issues.apache.org/jira/browse/HARMONY-2641
             Project: Harmony
          Issue Type: Bug
          Components: Non-bug differences from RI
            Reporter: Ilya Okomin
            Priority: Minor


RI throws unspecified ArrayIndexOutOfBoundsException for java.awt.image.DataBufferByte(int size, int numBanks) when numBanks == 0, while Harmony works silently. 
Test to reproduce:
----------- test.java -------------
import junit.framework.TestCase;
import junit.textui.TestRunner;

import java.awt.image.DataBufferByte;

public class test extends TestCase {
    public static void main(String args[]) {
        TestRunner.run(test.class);
    }

    public void testRun() {
        try {
            DataBufferByte db = new DataBufferByte(21, 0);
            fail("ArrayIndexOutOfBoundsException expected");
        } catch (ArrayIndexOutOfBoundsException expectedException) {
            // Expected
            expectedException.printStackTrace();
        }
    }
}
-------------------------------
Output RI:
========
.java.lang.ArrayIndexOutOfBoundsException
	at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:60)
	at test.testRun(test.java:13)
	at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
	at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.textui.TestRunner.doRun(TestRunner.java:116)
	at junit.textui.TestRunner.doRun(TestRunner.java:109)
	at junit.textui.TestRunner.run(TestRunner.java:72)
	at junit.textui.TestRunner.run(TestRunner.java:57)
	at test.main(test.java:8)

Time: 0,03

OK (1 test)

Output Harmony:
=============
.F
Time: 0.08
There was 1 failure:
1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
	at test.testRun(test.java:14)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at test.main(test.java:8)

FAILURES!!!
Tests run: 1,  Failures: 1,  Errors: 0

I suggest to resolve this bug as non-bug difference since there is nothing said in spec about any exceptions in DataBuffer constructor and it is not obvious what was the reason of failure on RI.

-- 
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-2641) [classlib][awt] Compatibility: java.awt.image.DataBufferByte(int,int) does not throw ArrayIndexOutOfBoundsException on Harmony while it does on RI

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

Alexey Petrenko closed HARMONY-2641.
------------------------------------

    Resolution: Won't Fix

Closed as non bug difference

http://mail-archives.apache.org/mod_mbox/harmony-dev/200707.mbox/%3cc3755b3a0707120617tf990260s9afa7838d3d0be5f@mail.gmail.com%3e

> [classlib][awt] Compatibility: java.awt.image.DataBufferByte(int,int) does not throw ArrayIndexOutOfBoundsException on Harmony while it does on RI
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2641
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>            Assignee: Alexey Petrenko
>            Priority: Minor
>
> RI throws unspecified ArrayIndexOutOfBoundsException for java.awt.image.DataBufferByte(int size, int numBanks) when numBanks == 0, while Harmony works silently. 
> Test to reproduce:
> ----------- test.java -------------
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> import java.awt.image.DataBufferByte;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             DataBufferByte db = new DataBufferByte(21, 0);
>             fail("ArrayIndexOutOfBoundsException expected");
>         } catch (ArrayIndexOutOfBoundsException expectedException) {
>             // Expected
>             expectedException.printStackTrace();
>         }
>     }
> }
> -------------------------------
> Output RI:
> ========
> .java.lang.ArrayIndexOutOfBoundsException
> 	at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:60)
> 	at test.testRun(test.java:13)
> 	at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:116)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:109)
> 	at junit.textui.TestRunner.run(TestRunner.java:72)
> 	at junit.textui.TestRunner.run(TestRunner.java:57)
> 	at test.main(test.java:8)
> Time: 0,03
> OK (1 test)
> Output Harmony:
> =============
> .F
> Time: 0.08
> There was 1 failure:
> 1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
> 	at test.testRun(test.java:14)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at test.main(test.java:8)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0
> I suggest to resolve this bug as non-bug difference since there is nothing said in spec about any exceptions in DataBuffer constructor and it is not obvious what was the reason of failure on RI.

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


[jira] Assigned: (HARMONY-2641) [classlib][awt] Compatibility: java.awt.image.DataBufferByte(int,int) does not throw ArrayIndexOutOfBoundsException on Harmony while it does on RI

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

Alexey Petrenko reassigned HARMONY-2641:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][awt] Compatibility: java.awt.image.DataBufferByte(int,int) does not throw ArrayIndexOutOfBoundsException on Harmony while it does on RI
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2641
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Ilya Okomin
>            Assignee: Alexey Petrenko
>            Priority: Minor
>
> RI throws unspecified ArrayIndexOutOfBoundsException for java.awt.image.DataBufferByte(int size, int numBanks) when numBanks == 0, while Harmony works silently. 
> Test to reproduce:
> ----------- test.java -------------
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> import java.awt.image.DataBufferByte;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         try {
>             DataBufferByte db = new DataBufferByte(21, 0);
>             fail("ArrayIndexOutOfBoundsException expected");
>         } catch (ArrayIndexOutOfBoundsException expectedException) {
>             // Expected
>             expectedException.printStackTrace();
>         }
>     }
> }
> -------------------------------
> Output RI:
> ========
> .java.lang.ArrayIndexOutOfBoundsException
> 	at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:60)
> 	at test.testRun(test.java:13)
> 	at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:116)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:109)
> 	at junit.textui.TestRunner.run(TestRunner.java:72)
> 	at junit.textui.TestRunner.run(TestRunner.java:57)
> 	at test.main(test.java:8)
> Time: 0,03
> OK (1 test)
> Output Harmony:
> =============
> .F
> Time: 0.08
> There was 1 failure:
> 1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
> 	at test.testRun(test.java:14)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at test.main(test.java:8)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0
> I suggest to resolve this bug as non-bug difference since there is nothing said in spec about any exceptions in DataBuffer constructor and it is not obvious what was the reason of failure on RI.

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