harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov" <alexei.fedo...@gmail.com>
Subject Re: RasterTest failure fixed
Date Thu, 08 May 2008 11:16:15 GMT
Tharindu, thanks for your effort.

I believe the buffer was intentionally small, see [1]. When the buffer
was small, the expected ArrayIndexOutOfBoundsException was not thrown,
was it?

Thanks.

[1] https://issues.apache.org/jira/browse/HARMONY-2875

On Thu, May 8, 2008 at 2:41 PM, Mackie Mathew <mccloud35@gmail.com> wrote:
> RasterTest was failing because testGetPixels was failing. I was able to pass
>  the test with the following modfications:
>
>  public void testGetPixels() {
>         // Regression test for HARMONY-2875
>         try {
>             Raster raster = Raster.createRaster(new BandedSampleModel(1, 2,
>  3, 4),
>                     new DataBufferByte(new byte[191], *6)*,
>                     new Point(new Point(28, 43)));
>
>             raster.getPixels(6,
>                     Integer.MAX_VALUE, 1, 0, new int[] {});
>             fail("ArrayIndexOutOfBoundsException should be thrown");
>  //$NON-NLS-1$
>         } catch (ArrayIndexOutOfBoundsException e) {
>             // expected
>         }
>
>
>  The test was failing  because the DataBuffer size was too small. When it was
>  increased from 5 to 6, the test passed. Is this fix acceptable?
>  --
>  Regards,
>
>  Tharindu
>



-- 
With best regards,
Alexei

Mime
View raw message