harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Pavlenko (JIRA)" <j...@apache.org>
Subject [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
Date Tue, 30 Jan 2007 12:15:33 GMT

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


Mime
View raw message