Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Harmony throws specified RasterFormatException for createInterleavedRaster(int dataType,int w,int h,int bands,Point location) but RI throws unspecified
NegativeArraySizeException. I'd suggest to treat this as a non-bug difference from RI.
------------------------------------------------------------------------------
import junit.framework.TestCase;
import java.awt.*;
import java.awt.image.*;
public class Test extends TestCase {
public void testcase() {
try
catch (NegativeArraySizeException expectedException)
{ System.out.println(expectedException +" was thrown"); }catch (RasterFormatException expectedException)
{ fail(expectedException +" was thrown"); } }
}
------------------------------------------------------------------------------
Harmony:
junit.framework.AssertionFailedError: java.awt.image.RasterFormatException: w or h is less than or equal to zero was thrown
at java.awt.image.RasterTest.testcase(RasterTest.java:46)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
RI:
java.lang.NegativeArraySizeException: allocLargeArray was thrown