RFR: 8286389: Address possibly lossy conversions in jdk.crypto.ec
Xue-Lei Andrew Fan
xuelei at openjdk.org
Tue Jun 21 16:51:34 UTC 2022
On Fri, 17 Jun 2022 16:05:38 GMT, Ryan Ernst <duke at openjdk.org> wrote:
> Applied required casts in jdk.crypto.ec for the upcoming warning.
> Verified by cherry-picking @asotona's patch.
Marked as reviewed by xuelei (Reviewer).
src/jdk.crypto.ec/share/classes/sun/security/ec/XDHPublicKeyImpl.java line 79:
> 77: int bitsMod8 = params.getBits() % 8;
> 78: if (bitsMod8 != 0) {
> 79: byte mask = (byte) ((1 << bitsMod8) - 1);
I may not insert a whitespace after the "(byte)" conversion. Similar to following update. Otherwise, looks good to me.
-------------
PR: https://git.openjdk.org/jdk/pull/9203
More information about the security-dev
mailing list