8289274: Cleanup unnecessary null comparison before instanceof check in security modules

Reviewed-by: mullan
This commit is contained in:
Andrey Turbanov 2022-07-09 17:59:43 +00:00
parent 81ee7d28f8
commit 87aa3ce03e
14 changed files with 54 additions and 94 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -87,10 +87,9 @@ public final class AccessDescription {
}
public boolean equals(Object obj) {
if (obj == null || (!(obj instanceof AccessDescription))) {
if (!(obj instanceof AccessDescription that)) {
return false;
}
AccessDescription that = (AccessDescription)obj;
if (this == that) {
return true;