RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v51]

Raffaello Giulietti rgiulietti at openjdk.org
Wed May 7 15:59:19 UTC 2025


On Wed, 7 May 2025 15:28:59 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Removed needless brackets
>
> src/java.base/share/classes/java/math/BigInteger.java line 2607:
> 
>> 2605: 
>> 2606:         BigInteger base = this.abs();
>> 2607:         final boolean negative = signum < 0 && (exponent & 1) == 1;
> 
> Some effectively final locals are declared `final`, while others are not.

Personally, I don't have a strong preference, but I prefer consistency.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24690#discussion_r2077981057


More information about the core-libs-dev mailing list