On Wed, 17 Jun 2026 23:26:56 GMT, Anthony Scarpino <[email protected]> 
wrote:

>> 0 as number of limbs doesn't make sense as no number can be represented that 
>> way. I think the IntegerPolynomialModBinP class was created for testing 
>> purposes mainly and only the two inner classes should subclass it, i.e. the 
>> constructor should rather be private and in that case the 0 number of limbs 
>> would not be a concern. @ascarpino, do you remember what this class was made 
>> for and whether it is obsolete now?
>
> Perhaps the `Curve25519OrderField` and `Curve448OrderField` can be refactored 
> away from `IntegerPolynomialModBinP`, but I would not suggest that for this 
> PR.
> 
> I'm ok with changing the constructor to be private, but it's not accessible 
> from the public API, so it's not a necessary change.

Ok, so if the only clients can be in this package then I guess that it is very 
unlikely anyone is ever going pass in an `IntegerPolynomialModBinP` instance 
with zero limbs.
@ferakocz could you add a comment above the declaration of ctr stating that the 
loop assumes the limb count in ctr is positive.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30941#discussion_r3434590275

Reply via email to