RFR: 8259385: Cleanup unused assignment

Attila Szegedi attila at openjdk.java.net
Sun Jan 10 19:54:55 UTC 2021


On Thu, 7 Jan 2021 18:30:27 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

> In the SunJSSE provider implementation, there are a few cases that the assigned value is never used.  For example:
>   int i = 0;
>   i = Byte.toUnsignedInt(buf.get());
> could be simplified as
> `    int i = Byte.toUnsignedInt(buf.get());`
> 
> Code cleanup, no new regression test.

LGTM. Looks like a good ol' IntelliJ IDEA driven fixing (nothing wrong with that.) Maybe you could also fix those "temproary" typos while in there? FWIW, 2 of 3 occurrences of code containing them are almost entirely equivalent and could be refactored into a static method with a Supplier<byte[]> that produces the digest, but I guess it'd be worth filing a separate issue for that.

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

Marked as reviewed by attila (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1984



More information about the security-dev mailing list