You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2021/07/03 08:38:36 UTC
[iotdb] branch fix_null_pointer_in_cluster_0.12 created (now
a8154bd)
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a change to branch fix_null_pointer_in_cluster_0.12
in repository https://gitbox.apache.org/repos/asf/iotdb.git.
at a8154bd fix take byte array null pointer
This branch includes the following new commits:
new a8154bd fix take byte array null pointer
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/01: fix take byte array null pointer
Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch fix_null_pointer_in_cluster_0.12
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit a8154bdae456e088556aa1f9a262809e390adaae
Author: qiaojialin <64...@qq.com>
AuthorDate: Sat Jul 3 16:38:08 2021 +0800
fix take byte array null pointer
---
.../main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java b/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java
index 71b3136..78200f0 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java
@@ -35,7 +35,13 @@ public class PlanSerializer {
}
public byte[] serialize(PhysicalPlan plan) throws IOException {
- ByteArrayOutputStream poll = baosBlockingDeque.poll();
+ ByteArrayOutputStream poll;
+ try {
+ poll = baosBlockingDeque.take();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new IOException("take byte array output stream interrupted", e);
+ }
poll.reset();
try (DataOutputStream dataOutputStream = new DataOutputStream(poll)) {