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-2884) [classlib][awt] Compatibility: java.awt.image.Raster.createPackedRaster() throws RasterFormatException on RI while it doesn't on Harmony
Date Wed, 27 Dec 2006 08:11:21 GMT
[classlib][awt] Compatibility: java.awt.image.Raster.createPackedRaster() throws RasterFormatException
on RI while it doesn't on Harmony
----------------------------------------------------------------------------------------------------------------------------------------

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


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