This is an automated email from the ASF dual-hosted git repository.
jmclean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 80e1fc72a [#4210] Improvement: Removing redundant null check in
TreeLockNode.java (#4217)
80e1fc72a is described below
commit 80e1fc72a0e0ee5aa243d897f368b0f17b058482
Author: Noobtastic <[email protected]>
AuthorDate: Sun Jul 21 20:37:35 2024 -0500
[#4210] Improvement: Removing redundant null check in TreeLockNode.java
(#4217)
### What changes were proposed in this pull request?
Removed the redundant null check in TreeLockNode, since 'instanceof'
returns false for null values.
Fix: #4210
### Does this PR introduce any user-facing change?
No need.
### How was this patch tested?
Existing tests.
---
core/src/main/java/org/apache/gravitino/lock/TreeLockNode.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/gravitino/lock/TreeLockNode.java
b/core/src/main/java/org/apache/gravitino/lock/TreeLockNode.java
index f10baccc5..f9434eb7c 100644
--- a/core/src/main/java/org/apache/gravitino/lock/TreeLockNode.java
+++ b/core/src/main/java/org/apache/gravitino/lock/TreeLockNode.java
@@ -77,7 +77,7 @@ public class TreeLockNode {
if (this == o) {
return true;
}
- if (o == null || !(o instanceof ThreadIdentifier)) {
+ if (!(o instanceof ThreadIdentifier)) {
return false;
}
ThreadIdentifier that = (ThreadIdentifier) o;