This is the mail archive of the
mauve-discuss@sources.redhat.com
mailing list for the Mauve project.
FW: Question about Java Lang testcase JAVA.LANG.REFLECT.ARRAY.NEGATIVEARRAYSIZEEXCEPTION
- From: "Patrick Ellis" <Patrick dot Ellis at sas dot com>
- To: "mauve-discuss at sources dot redhat dot com" <'mauve-discuss at sources dot redhat dot com'>
- Date: Mon, 7 Apr 2003 16:32:45 -0400
- Subject: FW: Question about Java Lang testcase JAVA.LANG.REFLECT.ARRAY.NEGATIVEARRAYSIZEEXCEPTION
Pat Ellis
SDE Build and Test Team
Phone: (919) 531-0355
R2263 Patrick dot Ellis at sas dot com
SAS... The Power to Know
> -----Original Message-----
> From: Patrick Ellis
> Sent: Monday, April 07, 2003 4:31 PM
> To: 'mauve-discuss at sources dot redhat dot com'
> Subject: Question about Java Lang testcase JAVA.LANG.REFLECT.ARRAY.NEGATIVEARRAYSIZEEXCEPTION
>
>
> Question about JAVA.LANG.REFLECT.ARRAY.NEGATIVEARRAYSIZEEXCEPTION. This is part of the testcase in java.lang.
>
> int val = 0;
> Object x = null;
> val = 0;
> try
> {
> x = new int[0][-1];
> val = 1;
> }
> catch (NegativeArraySizeException e)
> {
> val = 2;
> e.printStackTrace(System.out);
>
> }
>
> the testcase should throw an NegativeArraySizeException but because the negative -1 is the second element and 0 is the first element
> some JVMs fail to throw the exception. Should the testcase be changed from x = new int[0][-1]; -----> x = new int[1][-1];
>
>
> Pat Ellis
> SDE Build and Test Team
> Phone: (919) 531-0355
> R2263 Patrick dot Ellis at sas dot com
> SAS... The Power to Know
>