harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Imran Ghory (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4650) BigInteger(int signum, int digits[]) constructor bug
Date Sun, 19 Aug 2007 23:37:30 GMT
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
            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.


Mime
View raw message