RFR: 8356891: Some code simplifications in BigInteger [v22]
fabioromano1
duke at openjdk.org
Tue May 27 17:34:28 UTC 2025
On Tue, 27 May 2025 17:25:25 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> @rgiulietti Because the method assumes that `a` represents a two's complement negative integer, so there is at least a sign bit?
>
> There's only one usage of `makePositive(int[])`, and only when `a[0] < 0`.
> And then there's the method comment that assumes a negative 2's complement number in `a`.
>
> But if you don't feel sure, I don't mind keeping the line as it is.
It respects the method's assumptions, so for me it's ok.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25166#discussion_r2109778137
More information about the core-libs-dev
mailing list