You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Pavlenko (JIRA)" <ji...@apache.org> on 2007/01/30 13:15:33 UTC

[jira] Commented: (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

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

Andrey Pavlenko commented on HARMONY-2880:
------------------------------------------

In this example Harmony follows the spec. This issue should be closed as non-bug diff.

> [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: https://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.
-
You can reply to this email to add a comment to the issue online.