Integrated: JDK-8257448: Clean duplicated non-null check in the SunJSSE provider implementation

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Mon Nov 30 22:00:58 UTC 2020


On Mon, 30 Nov 2020 19:51:42 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

> In the SunJSSE provider implementation, there are a few non-null check, used together with "instanceof" check.  For such cases, the non-null check is redundant as it could be covered by the "instanceof" check.  This update will remove the non-null check, like:
> -   if ((cause != null) && (cause instanceof IOException)) { 
> +  if (cause instanceof IOException) {
> 
> Code cleanup, no new regression text.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8257448

This pull request has now been integrated.

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

8257448: Clean duplicated non-null check in the SunJSSE provider implementation

Reviewed-by: mullan

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

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



More information about the security-dev mailing list