You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2009/06/25 22:38:07 UTC

[jira] Closed: (HARMONY-4650) BigInteger(int signum, int digits[]) constructor bug

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

Mark Hindess closed HARMONY-4650.
---------------------------------


Closing as this is fixed in the current code.


> BigInteger(int signum, int digits[]) constructor bug
> ----------------------------------------------------
>
>                 Key: HARMONY-4650
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4650
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Imran Ghory
>            Assignee: Paulex Yang
>            Priority: Minor
>
> The following constructor appears to contain a bug, it looks like "digits = new int[] { 0 };" is supposed to be  "this.digits = new int[] { 0 };".  I haven't quite figured out how to cause this bug to be visible via the public API yet, but I wouldn't be surprised if it was.
>     BigInteger(int signum, int digits[]) {
>         if (digits.length == 0) {
>             sign = 0;
>             numberLength = 1;
>             digits = new int[] { 0 };
>         } else {
>             sign = signum;
>             numberLength = digits.length;
>             this.digits = digits;
>             cutOffLeadingZeroes();
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.