Integrated: 8259223: Simplify boolean expression in the SunJSSE provider

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Tue Jan 5 19:35:58 UTC 2021


On Tue, 5 Jan 2021 07:06:42 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

> There are some boolean expressions that could be improved for better readability in the SunJSSE provider implementation. For example: 
> 
> - if (cert instanceof X509Certificate == false) { 
> + if (!(cert instanceof X509Certificate)) { 
> 
> - return isDTLS ? true : (id >= TLS10.id);
> + return isDTLS || (id >= TLS10.id);
> 
> 
> Code cleanup, no new regression test.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8259223

This pull request has now been integrated.

Changeset: 4d3d5991
Author:    Xue-Lei Andrew Fan <xuelei at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/4d3d5991
Stats:     35 lines in 11 files changed: 0 ins; 0 del; 35 mod

8259223: Simplify boolean expression in the SunJSSE provider

Reviewed-by: mullan

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

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



More information about the security-dev mailing list