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-2880) [classlib][awt] Compatibility: java.awt.image.Raster.getPixels(int x,int y,int w,int h,double[] dArray) throws ArrayIndexOutOfBoundsException while RI doesn't
Date Tue, 26 Dec 2006 13:26:21 GMT
[classlib][awt] Compatibility: java.awt.image.Raster.getPixels(int x,int y,int w,int h,double[]
dArray) throws ArrayIndexOutOfBoundsException while RI doesn't
--------------------------------------------------------------------------------------------------------------------------------------------------------------

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


Harmony throws specified ArrayIndexOutOfBoundsException for java.awt.image.Raster.getPixels(int
x,int y,int w,int h,double[] dArray) while
RI works silently.
Check next test case to reproduce issue, it passes on RI and fails on Harmony:
------------------ test.java ------------------
import java.awt.Point;
import java.awt.image.DataBufferDouble;
import java.awt.image.PixelInterleavedSampleModel;
import java.awt.image.Raster;

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() {
        int[] bandOffsets = new int[233];
        final int dataType = 2;
        final int w = 1;
        final int h = 1;
        final int pixelStride = 5;
        final int scanlineStride = 22785;

        PixelInterleavedSampleModel sm = new PixelInterleavedSampleModel(
                dataType, w, h, pixelStride, scanlineStride, bandOffsets);

        final int size = 127;
        final int numBanks = 3;

        DataBufferDouble dbf = new DataBufferDouble(size, numBanks);
        Point point = new Point();

        Raster localRaster = Raster.createRaster(sm, dbf, point);
        double[] array1 = new double[] {};
        final int x = 2;
        final int y = 2;
        final int rw = 2;
        final int rh = -1;
        localRaster.getPixels(x, y, rw, rh, array1);
    }
}
-------------------------------------------------


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