harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Okomin (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2551) [classlib][awt] Compatibility: java.awt.image.BufferedImage.setData(Raster) throws ClassCastException while RI does not
Date Fri, 08 Dec 2006 14:44:23 GMT
[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

        

Mime
View raw message