harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-2641) [classlib][awt] Compatibility: java.awt.image.DataBufferByte(int,int) does not throw ArrayIndexOutOfBoundsException on Harmony while it does on RI
Date Thu, 12 Jul 2007 08:30:04 GMT

     [ 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.


Mime
View raw message