You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2021/06/25 19:26:32 UTC
[pulsar] branch master updated: fix #10781 Build failure because of
spotbugs (#10792)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 296ba76 fix #10781 Build failure because of spotbugs (#10792)
296ba76 is described below
commit 296ba767079d3e9a1687dfa409989dd83abff445
Author: Jason918 <ja...@qq.com>
AuthorDate: Sat Jun 26 03:25:59 2021 +0800
fix #10781 Build failure because of spotbugs (#10792)
Fixes #10781
### Motivation
solving build failure case causing by spotbugs issue which is explained in #10781
### Modifications
Small modification: add a null check in BKStateStoreImpl.java:[line 175]
---
.../org/apache/pulsar/functions/instance/state/BKStateStoreImpl.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/state/BKStateStoreImpl.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/state/BKStateStoreImpl.java
index 8714d2c..1ffd8f7 100644
--- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/state/BKStateStoreImpl.java
+++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/state/BKStateStoreImpl.java
@@ -172,7 +172,9 @@ public class BKStateStoreImpl implements DefaultStateStore {
}
return null;
} finally {
- ReferenceCountUtil.safeRelease(data);
+ if (data != null) {
+ ReferenceCountUtil.safeRelease(data);
+ }
}
}
);