harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Khaschansky (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2774) [classlib][awt] Compatibility: java.awt.image.Raster.createInterleavedRaster(int dataType,int w,int h,int bands,Point location) throws RasterFormatException but RI throws NegativeArraySizeException
Date Mon, 18 Dec 2006 12:35:21 GMT
[classlib][awt] Compatibility: java.awt.image.Raster.createInterleavedRaster(int dataType,int
w,int h,int bands,Point location) throws RasterFormatException but RI throws NegativeArraySizeException
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2774
                 URL: http://issues.apache.org/jira/browse/HARMONY-2774
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Oleg Khaschansky
            Priority: Minor


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 {
            Raster.createInterleavedRaster(0,6,-3,1, new Point());
            fail("Exception expected");
        } 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message