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 14:43:21 UTC
[jira] Created: (HARMONY-2794)
[classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents
throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
[classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
----------------------------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-2794
URL: http://issues.apache.org/jira/browse/HARMONY-2794
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Ilya Okomin
Priority: Minor
According to the specification for getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset):
"If the normComponents array is null, a new array will be allocated" and "an ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset)".
Test listed below sets normComponents==null.
In this case RI does not throw an exception according to the specification while Harmony throws.
---------------- test.java-------------------
import junit.framework.TestCase;
import java.awt.*;
import java.awt.image.*;
public class test extends TestCase {
public void test1 () {
IndexColorModel obj=new IndexColorModel(1,1,new byte[]{1,1,1},0,
false);
obj.getNormalizedComponents(new int[] {1,-23,5,67,89,0}, 1, null,
1002);
}
}
----------------------------------------
Output on Sun 1.5:
==================
.
Time: 0
OK (1 test)
Output on Harmony:
==================
.E
Time: 0.016
There was 1 error:
1) test1(test)java.lang.ArrayIndexOutOfBoundsException
at
java.awt.image.ColorModel.getNormalizedComponents(ColorModel.java:294)
at test.test1(test.java:7)
at java.lang.reflect.VMReflection.invokeMethod(Native Method)
FAILURES!!!
Note: The same issue is for IndexColorModel.getUnnormalizedComponents()
--
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-2794)
[classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents
throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
Posted by "Alexander D Shipilov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2794?page=all ]
Alexander D Shipilov updated HARMONY-2794:
------------------------------------------
Attachment: ColorModel2794.patch
Patch with fix
> [classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2794
> URL: http://issues.apache.org/jira/browse/HARMONY-2794
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: ColorModel2794.patch, ColorModel2794Test.patch
>
>
> According to the specification for getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset):
> "If the normComponents array is null, a new array will be allocated" and "an ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset)".
> Test listed below sets normComponents==null.
> In this case RI does not throw an exception according to the specification while Harmony throws.
> ---------------- test.java-------------------
> import junit.framework.TestCase;
> import java.awt.*;
> import java.awt.image.*;
> public class test extends TestCase {
> public void test1 () {
> IndexColorModel obj=new IndexColorModel(1,1,new byte[]{1,1,1},0,
> false);
> obj.getNormalizedComponents(new int[] {1,-23,5,67,89,0}, 1, null,
> 1002);
> }
> }
> ----------------------------------------
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.016
> There was 1 error:
> 1) test1(test)java.lang.ArrayIndexOutOfBoundsException
> at
> java.awt.image.ColorModel.getNormalizedComponents(ColorModel.java:294)
> at test.test1(test.java:7)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Note: The same issue is for IndexColorModel.getUnnormalizedComponents()
--
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-2794)
[classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents
throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
Posted by "Alexander D Shipilov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2794?page=all ]
Alexander D Shipilov updated HARMONY-2794:
------------------------------------------
Attachment: ColorModel2794Test.patch
Patch with regression test
> [classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2794
> URL: http://issues.apache.org/jira/browse/HARMONY-2794
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: ColorModel2794.patch, ColorModel2794Test.patch
>
>
> According to the specification for getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset):
> "If the normComponents array is null, a new array will be allocated" and "an ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset)".
> Test listed below sets normComponents==null.
> In this case RI does not throw an exception according to the specification while Harmony throws.
> ---------------- test.java-------------------
> import junit.framework.TestCase;
> import java.awt.*;
> import java.awt.image.*;
> public class test extends TestCase {
> public void test1 () {
> IndexColorModel obj=new IndexColorModel(1,1,new byte[]{1,1,1},0,
> false);
> obj.getNormalizedComponents(new int[] {1,-23,5,67,89,0}, 1, null,
> 1002);
> }
> }
> ----------------------------------------
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.016
> There was 1 error:
> 1) test1(test)java.lang.ArrayIndexOutOfBoundsException
> at
> java.awt.image.ColorModel.getNormalizedComponents(ColorModel.java:294)
> at test.test1(test.java:7)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Note: The same issue is for IndexColorModel.getUnnormalizedComponents()
--
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-2794)
[classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents
throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess resolved HARMONY-2794.
-----------------------------------
Resolution: Fixed
Assignee: Mark Hindess
Applied patches in r496242. Please confirm they have been applied as expected.
> [classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2794
> URL: https://issues.apache.org/jira/browse/HARMONY-2794
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assigned To: Mark Hindess
> Priority: Minor
> Attachments: ColorModel2794.patch, ColorModel2794Test.patch
>
>
> According to the specification for getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset):
> "If the normComponents array is null, a new array will be allocated" and "an ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset)".
> Test listed below sets normComponents==null.
> In this case RI does not throw an exception according to the specification while Harmony throws.
> ---------------- test.java-------------------
> import junit.framework.TestCase;
> import java.awt.*;
> import java.awt.image.*;
> public class test extends TestCase {
> public void test1 () {
> IndexColorModel obj=new IndexColorModel(1,1,new byte[]{1,1,1},0,
> false);
> obj.getNormalizedComponents(new int[] {1,-23,5,67,89,0}, 1, null,
> 1002);
> }
> }
> ----------------------------------------
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.016
> There was 1 error:
> 1) test1(test)java.lang.ArrayIndexOutOfBoundsException
> at
> java.awt.image.ColorModel.getNormalizedComponents(ColorModel.java:294)
> at test.test1(test.java:7)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Note: The same issue is for IndexColorModel.getUnnormalizedComponents()
--
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] Closed: (HARMONY-2794)
[classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents
throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess closed HARMONY-2794.
---------------------------------
No response. Assuming it is okay.
> [classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2794
> URL: https://issues.apache.org/jira/browse/HARMONY-2794
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Assignee: Mark Hindess
> Priority: Minor
> Attachments: ColorModel2794.patch, ColorModel2794Test.patch
>
>
> According to the specification for getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset):
> "If the normComponents array is null, a new array will be allocated" and "an ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset)".
> Test listed below sets normComponents==null.
> In this case RI does not throw an exception according to the specification while Harmony throws.
> ---------------- test.java-------------------
> import junit.framework.TestCase;
> import java.awt.*;
> import java.awt.image.*;
> public class test extends TestCase {
> public void test1 () {
> IndexColorModel obj=new IndexColorModel(1,1,new byte[]{1,1,1},0,
> false);
> obj.getNormalizedComponents(new int[] {1,-23,5,67,89,0}, 1, null,
> 1002);
> }
> }
> ----------------------------------------
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.016
> There was 1 error:
> 1) test1(test)java.lang.ArrayIndexOutOfBoundsException
> at
> java.awt.image.ColorModel.getNormalizedComponents(ColorModel.java:294)
> at test.test1(test.java:7)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Note: The same issue is for IndexColorModel.getUnnormalizedComponents()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2794)
[classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents
throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2794?page=all ]
Alexei Zakharov updated HARMONY-2794:
-------------------------------------
Patch Info: [Patch Available]
> [classlib][awt]java.awt.image.IndexColorModel.getNormalizedComponents throws ArrayIndexOutOfBoundsException on Harmony while it does not on RI
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2794
> URL: http://issues.apache.org/jira/browse/HARMONY-2794
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: ColorModel2794.patch, ColorModel2794Test.patch
>
>
> According to the specification for getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset):
> "If the normComponents array is null, a new array will be allocated" and "an ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset)".
> Test listed below sets normComponents==null.
> In this case RI does not throw an exception according to the specification while Harmony throws.
> ---------------- test.java-------------------
> import junit.framework.TestCase;
> import java.awt.*;
> import java.awt.image.*;
> public class test extends TestCase {
> public void test1 () {
> IndexColorModel obj=new IndexColorModel(1,1,new byte[]{1,1,1},0,
> false);
> obj.getNormalizedComponents(new int[] {1,-23,5,67,89,0}, 1, null,
> 1002);
> }
> }
> ----------------------------------------
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.016
> There was 1 error:
> 1) test1(test)java.lang.ArrayIndexOutOfBoundsException
> at
> java.awt.image.ColorModel.getNormalizedComponents(ColorModel.java:294)
> at test.test1(test.java:7)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Note: The same issue is for IndexColorModel.getUnnormalizedComponents()
--
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