This is an automated email from the ASF dual-hosted git repository.
oliverwqcwrw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new d2c436b7fb [ISSUE #7199] grpcClientChannel header add null judgement
(#7238)
d2c436b7fb is described below
commit d2c436b7fb86eec9d9abe89766f8b4a60cbb721f
Author: weihubeats <[email protected]>
AuthorDate: Thu Nov 28 18:01:45 2024 +0800
[ISSUE #7199] grpcClientChannel header add null judgement (#7238)
adding a null judgement
---
.../org/apache/rocketmq/proxy/grpc/v2/channel/GrpcClientChannel.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/channel/GrpcClientChannel.java
b/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/channel/GrpcClientChannel.java
index 714d0bf019..f05251c58c 100644
---
a/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/channel/GrpcClientChannel.java
+++
b/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/channel/GrpcClientChannel.java
@@ -30,6 +30,7 @@ import io.grpc.StatusRuntimeException;
import io.grpc.stub.StreamObserver;
import io.netty.channel.Channel;
import io.netty.channel.ChannelId;
+import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.rocketmq.common.constant.LoggerName;
@@ -210,7 +211,7 @@ public class GrpcClientChannel extends ProxyChannel
implements ChannelExtendAttr
protected CompletableFuture<Void>
processGetConsumerRunningInfo(RemotingCommand command,
GetConsumerRunningInfoRequestHeader header,
CompletableFuture<ProxyRelayResult<ConsumerRunningInfo>>
responseFuture) {
- if (!header.isJstackEnable()) {
+ if (Objects.isNull(header) || !header.isJstackEnable()) {
return CompletableFuture.completedFuture(null);
}
this.writeTelemetryCommand(TelemetryCommand.newBuilder()