On Tue, 24 Feb 2026 18:07:26 GMT, Ben Perez <[email protected]> wrote:

>> test/jdk/sun/security/ec/xec/TestXDH.java line 369:
>> 
>>> 367:         PrivateKey privateKey = kf.generatePrivate(privateSpec);
>>> 368:         KeySpec publicSpec = new XECPublicKeySpec(paramSpec,
>>> 369:             Convert.hexStringToBigInteger(b_pub));
>> 
>> Can this be replaced with `new BigInteger(b_pub, 16)`?  If so, the 
>> Convert.java change isn't needed.
>
> That would work. It does seem like this is the only place 
> `hexStringToBigInteger` is used though, so keeping that functionality might 
> be confusing or unnecessary.

You may consider removing the method from `Convert.java`.  This appears to be 
the only caller.  That means Convert usage can be cleaned up from `@build` and 
`import` on this test too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29750#discussion_r2848811608

Reply via email to