From 08b62fca024cc9bfa496c3c925bbf8d877919293 Mon Sep 17 00:00:00 2001 From: ShannonDing Date: Tue, 14 May 2019 20:59:19 +0800 Subject: [PATCH] Add null point check before send message with namespace --- .../org/apache/rocketmq/client/producer/DefaultMQProducer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java b/client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java index 3a26e832..d5fbde03 100644 --- a/client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java +++ b/client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java @@ -331,6 +331,7 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send( Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { + Validators.checkMessage(msg,this); msg.setTopic(withNamespace(msg.getTopic())); return this.defaultMQProducerImpl.send(msg); } -- GitLab