harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-1047) [classlib][math]exception compatibility: new BigInteger(Integer.MAX_VALUE, (Random)null)
Date Fri, 12 Jan 2007 17:05:27 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Ellison resolved HARMONY-1047.
----------------------------------

    Resolution: Fixed

Thanks Nellya.

Patch applied to MATH module at repo revision r495643.

Please verify that is was applied correctly.



> [classlib][math]exception compatibility: new BigInteger(Integer.MAX_VALUE, (Random)null)
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1047
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1047
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Denis Kishenko
>         Assigned To: Tim Ellison
>         Attachments: HARMONY-1047-test.patch, HARMONY-1047.patch
>
>
> Different exception behaviour when create a huge BigInteger. 
> Actually it's impossible to create BigInteger with numBits=Integer.MAX_VALUE, but RI
throws an Exception while Harmony throws an Error.
> Test --------------------------------------------------------------
> mport java.math.BigInteger;
> import java.util.Random;
> public class bug9282 {
>    public static void main(String args[] ) {
>   	 new BigInteger(Integer.MAX_VALUE, (Random)null);
>    }   
> }
> Output -------------------------------------------------------
> RI
> java.lang.NegativeArraySizeException: Negative size-268435455
> 	at java.math.BigInteger.randomBits(BigInteger.java:471)
> 	at java.math.BigInteger.<init>(BigInteger.java:464)
> 	at bug9282.main(bug9282.java:6)
> Harmony
> java.lang.OutOfMemoryError
> 	<no stack trace available>

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

        

Mime
View raw message