Skip to content

Commit

Permalink
[#6272] fix: Remove the unnecessary null checks (#6296)
Browse files Browse the repository at this point in the history
**What changes were proposed in this pull request?**

Remove the unnecessary null checks.

**Why are the changes needed?**

[#6272] Unnecessary because instanceof returns null

**Does this PR introduce _any_ user-facing change?**

N/A

**How was this patch tested?**

N/A

Co-authored-by: SEO G S <[email protected]>
  • Loading branch information
github-actions[bot] and rud9192 authored Jan 16, 2025
1 parent f025777 commit 1edfab3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || !(o instanceof CatalogCredentialContext)) {
if (!(o instanceof CatalogCredentialContext)) {
return false;
}
return Objects.equal(userName, ((CatalogCredentialContext) o).userName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || !(o instanceof CredentialCacheKey)) {
if (!(o instanceof CredentialCacheKey)) {
return false;
}
CredentialCacheKey that = (CredentialCacheKey) o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || !(o instanceof PathBasedCredentialContext)) {
if (!(o instanceof PathBasedCredentialContext)) {
return false;
}
PathBasedCredentialContext that = (PathBasedCredentialContext) o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || !(o instanceof Key)) {
if (!(o instanceof Key)) {
return false;
}
Key key = (Key) o;
Expand Down

0 comments on commit 1edfab3

Please sign in to comment.