[ https://issues.apache.org/jira/browse/HARMONY-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexei Zakharov updated HARMONY-2884:
-------------------------------------
Patch Info: [Patch Available]
> [classlib][awt] Compatibility: java.awt.image.Raster.createPackedRaster() throws RasterFormatException
on RI while it doesn't on Harmony
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2884
> URL: https://issues.apache.org/jira/browse/HARMONY-2884
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: HARMONY-2884-Raster.patch, HARMONY-2884-RasterTest.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.
|