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/08 15:44:23 UTC

[jira] Created: (HARMONY-2551) [classlib][awt] Compatibility: java.awt.image.BufferedImage.setData(Raster) throws ClassCastException while RI does not

[classlib][awt] Compatibility: java.awt.image.BufferedImage.setData(Raster) throws ClassCastException while RI does not
-----------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2551
                 URL: http://issues.apache.org/jira/browse/HARMONY-2551
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ilya Okomin
            Priority: Minor
         Attachments: test.java

Harmony throws unspecified ClassCastException for java.awt.image.BufferedImage.setData(Raster) while RI works silently.
You can take a look at the attached testcase test.java.

After you look at the test you'll see that Exception is thrown because we are trying to set Raster with number of bands equaled to 704 and dataType == TYPE_SHORT to the BufferedImage with 4 number of bands (ABGR) and dataType == TYPE_BYTE.

I'm not sure that RI behaves correct as it works silently when the number of bands in Raster more than number of bands in the created BufferedImage. But if the number of bands in Raster less than in BufferedImage - RI throws ArrayIndexOutOfBoundsException. To check this try to set "int[] array0 = new int[3];" at test.java:23.


-- 
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-2551) [classlib][awt] Compatibility: java.awt.image.BufferedImage.setData(Raster) throws ClassCastException while RI does not

Posted by "Ilya Okomin (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2551?page=all ]

Ilya Okomin updated HARMONY-2551:
---------------------------------

    Attachment: test.java

Test case to reproduce exception.

> [classlib][awt] Compatibility: java.awt.image.BufferedImage.setData(Raster) throws ClassCastException while RI does not
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2551
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2551
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>            Priority: Minor
>         Attachments: test.java
>
>
> Harmony throws unspecified ClassCastException for java.awt.image.BufferedImage.setData(Raster) while RI works silently.
> You can take a look at the attached testcase test.java.
> After you look at the test you'll see that Exception is thrown because we are trying to set Raster with number of bands equaled to 704 and dataType == TYPE_SHORT to the BufferedImage with 4 number of bands (ABGR) and dataType == TYPE_BYTE.
> I'm not sure that RI behaves correct as it works silently when the number of bands in Raster more than number of bands in the created BufferedImage. But if the number of bands in Raster less than in BufferedImage - RI throws ArrayIndexOutOfBoundsException. To check this try to set "int[] array0 = new int[3];" at test.java:23.

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