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/19 17:04:21 UTC
[jira] Created: (HARMONY-2799) [java][awt] Compatibility:
java.awt.image.IndexColorModel.getDataElement() throws
ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
[java][awt] Compatibility: java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
---------------------------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-2799
URL: http://issues.apache.org/jira/browse/HARMONY-2799
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Ilya Okomin
Priority: Minor
java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony.
Test to reproduce:
---------------- test.java ---------------
import java.awt.image.IndexColorModel;
import junit.framework.TestCase;
import junit.textui.TestRunner;
public class test extends TestCase {
public static void main(String args[]) {
TestRunner.run(test.class);
}
public void testRun() {
int bits = 4;
int size = 166;
IndexColorModel localIndexColorModel = new IndexColorModel(bits, size,
new byte[size], new byte[size], new byte[size]);
int[] components = new int[] { 0, 0, 0, 0, 0, 0, 0 };
int offset = 6;
try {
int returnValue = localIndexColorModel.getDataElement(components, offset);
fail("ArrayIndexOutOfBoundsException expected");
} catch (ArrayIndexOutOfBoundsException unexpectedException) {
unexpectedException.printStackTrace();
}
}
}
--------------------------------------------
Output RI:
========
.java.lang.ArrayIndexOutOfBoundsException
at java.awt.image.IndexColorModel.getDataElement(IndexColorModel.java:1089)
at test.testRun(test.java:20)
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:9)
Time: 0,05
OK (1 test)
Output Harmony:
==============
.F
Time: 0.07
There was 1 failure:
1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
at test.testRun(test.java:21)
at java.lang.reflect.VMReflection.invokeMethod(Native Method)
at test.main(test.java:9)
FAILURES!!!
Tests run: 1, Failures: 1, Errors: 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] Updated: (HARMONY-2799) [java][awt] Compatibility:
java.awt.image.IndexColorModel.getDataElement() throws
ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
Posted by "Alexander D Shipilov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander D Shipilov updated HARMONY-2799:
------------------------------------------
Attachment: IndexColorModel2799Test.patch
> [java][awt] Compatibility: java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2799
> URL: https://issues.apache.org/jira/browse/HARMONY-2799
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: IndexColorModel2799.patch, IndexColorModel2799Test.patch
>
>
> java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony.
> Test to reproduce:
> ---------------- test.java ---------------
> import java.awt.image.IndexColorModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
> public static void main(String args[]) {
> TestRunner.run(test.class);
> }
> public void testRun() {
> int bits = 4;
> int size = 166;
> IndexColorModel localIndexColorModel = new IndexColorModel(bits, size,
> new byte[size], new byte[size], new byte[size]);
> int[] components = new int[] { 0, 0, 0, 0, 0, 0, 0 };
> int offset = 6;
> try {
> int returnValue = localIndexColorModel.getDataElement(components, offset);
> fail("ArrayIndexOutOfBoundsException expected");
> } catch (ArrayIndexOutOfBoundsException unexpectedException) {
> unexpectedException.printStackTrace();
> }
> }
> }
> --------------------------------------------
> Output RI:
> ========
> .java.lang.ArrayIndexOutOfBoundsException
> at java.awt.image.IndexColorModel.getDataElement(IndexColorModel.java:1089)
> at test.testRun(test.java:20)
> 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:9)
> Time: 0,05
> OK (1 test)
> Output Harmony:
> ==============
> .F
> Time: 0.07
> There was 1 failure:
> 1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
> at test.testRun(test.java:21)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> at test.main(test.java:9)
> FAILURES!!!
> Tests run: 1, Failures: 1, Errors: 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-2799) [java][awt] Compatibility:
java.awt.image.IndexColorModel.getDataElement() throws
ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov reassigned HARMONY-2799:
----------------------------------------
Assignee: Alexei Zakharov
> [java][awt] Compatibility: java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2799
> URL: https://issues.apache.org/jira/browse/HARMONY-2799
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: IndexColorModel2799.patch, IndexColorModel2799Test.patch
>
>
> java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony.
> Test to reproduce:
> ---------------- test.java ---------------
> import java.awt.image.IndexColorModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
> public static void main(String args[]) {
> TestRunner.run(test.class);
> }
> public void testRun() {
> int bits = 4;
> int size = 166;
> IndexColorModel localIndexColorModel = new IndexColorModel(bits, size,
> new byte[size], new byte[size], new byte[size]);
> int[] components = new int[] { 0, 0, 0, 0, 0, 0, 0 };
> int offset = 6;
> try {
> int returnValue = localIndexColorModel.getDataElement(components, offset);
> fail("ArrayIndexOutOfBoundsException expected");
> } catch (ArrayIndexOutOfBoundsException unexpectedException) {
> unexpectedException.printStackTrace();
> }
> }
> }
> --------------------------------------------
> Output RI:
> ========
> .java.lang.ArrayIndexOutOfBoundsException
> at java.awt.image.IndexColorModel.getDataElement(IndexColorModel.java:1089)
> at test.testRun(test.java:20)
> 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:9)
> Time: 0,05
> OK (1 test)
> Output Harmony:
> ==============
> .F
> Time: 0.07
> There was 1 failure:
> 1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
> at test.testRun(test.java:21)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> at test.main(test.java:9)
> FAILURES!!!
> Tests run: 1, Failures: 1, Errors: 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2799) [java][awt] Compatibility:
java.awt.image.IndexColorModel.getDataElement() throws
ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov updated HARMONY-2799:
-------------------------------------
Patch Info: [Patch Available]
> [java][awt] Compatibility: java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2799
> URL: https://issues.apache.org/jira/browse/HARMONY-2799
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: IndexColorModel2799.patch, IndexColorModel2799Test.patch
>
>
> java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony.
> Test to reproduce:
> ---------------- test.java ---------------
> import java.awt.image.IndexColorModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
> public static void main(String args[]) {
> TestRunner.run(test.class);
> }
> public void testRun() {
> int bits = 4;
> int size = 166;
> IndexColorModel localIndexColorModel = new IndexColorModel(bits, size,
> new byte[size], new byte[size], new byte[size]);
> int[] components = new int[] { 0, 0, 0, 0, 0, 0, 0 };
> int offset = 6;
> try {
> int returnValue = localIndexColorModel.getDataElement(components, offset);
> fail("ArrayIndexOutOfBoundsException expected");
> } catch (ArrayIndexOutOfBoundsException unexpectedException) {
> unexpectedException.printStackTrace();
> }
> }
> }
> --------------------------------------------
> Output RI:
> ========
> .java.lang.ArrayIndexOutOfBoundsException
> at java.awt.image.IndexColorModel.getDataElement(IndexColorModel.java:1089)
> at test.testRun(test.java:20)
> 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:9)
> Time: 0,05
> OK (1 test)
> Output Harmony:
> ==============
> .F
> Time: 0.07
> There was 1 failure:
> 1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
> at test.testRun(test.java:21)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> at test.main(test.java:9)
> FAILURES!!!
> Tests run: 1, Failures: 1, Errors: 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-2799) [java][awt] Compatibility:
java.awt.image.IndexColorModel.getDataElement() throws
ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov resolved HARMONY-2799.
--------------------------------------
Resolution: Fixed
Ilya, Alexander, thanks. The patch was applied at the revision r496269. Please check.
> [java][awt] Compatibility: java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2799
> URL: https://issues.apache.org/jira/browse/HARMONY-2799
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: IndexColorModel2799.patch, IndexColorModel2799Test.patch
>
>
> java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony.
> Test to reproduce:
> ---------------- test.java ---------------
> import java.awt.image.IndexColorModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
> public static void main(String args[]) {
> TestRunner.run(test.class);
> }
> public void testRun() {
> int bits = 4;
> int size = 166;
> IndexColorModel localIndexColorModel = new IndexColorModel(bits, size,
> new byte[size], new byte[size], new byte[size]);
> int[] components = new int[] { 0, 0, 0, 0, 0, 0, 0 };
> int offset = 6;
> try {
> int returnValue = localIndexColorModel.getDataElement(components, offset);
> fail("ArrayIndexOutOfBoundsException expected");
> } catch (ArrayIndexOutOfBoundsException unexpectedException) {
> unexpectedException.printStackTrace();
> }
> }
> }
> --------------------------------------------
> Output RI:
> ========
> .java.lang.ArrayIndexOutOfBoundsException
> at java.awt.image.IndexColorModel.getDataElement(IndexColorModel.java:1089)
> at test.testRun(test.java:20)
> 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:9)
> Time: 0,05
> OK (1 test)
> Output Harmony:
> ==============
> .F
> Time: 0.07
> There was 1 failure:
> 1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
> at test.testRun(test.java:21)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> at test.main(test.java:9)
> FAILURES!!!
> Tests run: 1, Failures: 1, Errors: 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2799) [java][awt] Compatibility:
java.awt.image.IndexColorModel.getDataElement() throws
ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
Posted by "Alexander D Shipilov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander D Shipilov updated HARMONY-2799:
------------------------------------------
Attachment: IndexColorModel2799.patch
> [java][awt] Compatibility: java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2799
> URL: https://issues.apache.org/jira/browse/HARMONY-2799
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: IndexColorModel2799.patch, IndexColorModel2799Test.patch
>
>
> java.awt.image.IndexColorModel.getDataElement() throws ArrayIndexOutOfBoundsException on RI and doesn't on Harmony.
> Test to reproduce:
> ---------------- test.java ---------------
> import java.awt.image.IndexColorModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
> public static void main(String args[]) {
> TestRunner.run(test.class);
> }
> public void testRun() {
> int bits = 4;
> int size = 166;
> IndexColorModel localIndexColorModel = new IndexColorModel(bits, size,
> new byte[size], new byte[size], new byte[size]);
> int[] components = new int[] { 0, 0, 0, 0, 0, 0, 0 };
> int offset = 6;
> try {
> int returnValue = localIndexColorModel.getDataElement(components, offset);
> fail("ArrayIndexOutOfBoundsException expected");
> } catch (ArrayIndexOutOfBoundsException unexpectedException) {
> unexpectedException.printStackTrace();
> }
> }
> }
> --------------------------------------------
> Output RI:
> ========
> .java.lang.ArrayIndexOutOfBoundsException
> at java.awt.image.IndexColorModel.getDataElement(IndexColorModel.java:1089)
> at test.testRun(test.java:20)
> 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:9)
> Time: 0,05
> OK (1 test)
> Output Harmony:
> ==============
> .F
> Time: 0.07
> There was 1 failure:
> 1) testRun(test)junit.framework.AssertionFailedError: ArrayIndexOutOfBoundsException expected
> at test.testRun(test.java:21)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> at test.main(test.java:9)
> FAILURES!!!
> Tests run: 1, Failures: 1, Errors: 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira