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] Commented: (HARMONY-2884) [classlib][awt] Compatibility: java.awt.image.Raster.createPackedRaster() throws RasterFormatException on RI while it doesn't on Harmony
Date Fri, 02 Mar 2007 08:12:51 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477220
] 

Alexey Petrenko commented on HARMONY-2884:
------------------------------------------

Andrey,

RasterTest.testGetPixels test fails after your patch:

Error dataBuffer is too small
java.awt.image.RasterFormatException: dataBuffer is too small
at java.awt.image.Raster.validateDataBuffer(Raster.java:859)
at java.awt.image.Raster.(Raster.java:66)
at java.awt.image.Raster.(Raster.java:578)
at java.awt.image.Raster.createRaster(Raster.java:541)
at java.awt.image.RasterTest.testGetPixels(RasterTest.java:110)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)

Could you please investigate.

> [classlib][awt] Compatibility: java.awt.image.Raster.createPackedRaster() throws RasterFormatException
on RI while it doesn't on Harmony
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2884
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2884
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>         Attachments: HARMONY-2884-Raster.patch, HARMONY-2884-RasterTest.patch
>
>
> Harmony does not throws RasterFormatException for java.awt.image.Raster.createPackedRaster(DataBuffer
dataBuffer,int w,int h, int scanlineStride,int[] bandMasks,Point location) while RI throws
it.
> Next test case passes on RI and fails on Harmony:
> ------------- test.java ------------
> import java.awt.Point;
> import java.awt.image.DataBufferInt;
> import java.awt.image.Raster;
> import java.awt.image.RasterFormatException;
> import java.awt.image.WritableRaster;
> 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() {
>         DataBufferInt localDataBufferInt = new DataBufferInt(1);
>         int[] array0 = new int[] { 0, 0, 0 };
>         Point localPoint = new Point(10292, 0);
>         try {
>             WritableRaster returnValue = Raster.createPackedRaster(
>                     localDataBufferInt, 7, 9, 214, array0, localPoint);
>             fail("RasterFormatException expected!");
>         } catch (RasterFormatException e) {
>             // expected
>             System.out.println("Exception : " + e.getMessage());
>         }
>     }
> }
> --------------------------------------
> Output on RI:
> ==========
> .Exception : Data array too small (should be 1718 but is 1 )
> Time: 0,131
> OK (1 test)

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