Skip to content

Commit ef866d4

Browse files
committed
Modify the judgment method
1 parent bb4bc5c commit ef866d4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,9 @@ private void initRocketMQPushConsumer() throws MQClientException {
625625
if (rocketMQListener == null && rocketMQReplyListener == null) {
626626
throw new IllegalArgumentException("Property 'rocketMQListener' or 'rocketMQReplyListener' is required");
627627
}
628-
Assert.notNull(consumerGroup, "Property 'consumerGroup' is required");
629-
Assert.notNull(nameServer, "Property 'nameServer' is required");
630-
Assert.notNull(topic, "Property 'topic' is required");
628+
Assert.hasText(consumerGroup, "Property 'consumerGroup' is required");
629+
Assert.hasText(nameServer, "Property 'nameServer' is required");
630+
Assert.hasText(topic, "Property 'topic' is required");
631631

632632
RPCHook rpcHook = RocketMQUtil.getRPCHookByAkSk(applicationContext.getEnvironment(),
633633
this.rocketMQMessageListener.accessKey(), this.rocketMQMessageListener.secretKey());

rocketmq-v5-client-spring-boot/src/main/java/org/apache/rocketmq/client/support/DefaultListenerContainer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ private void initRocketMQPushConsumer() {
255255
if (rocketMQListener == null) {
256256
throw new IllegalArgumentException("Property 'rocketMQListener' is required");
257257
}
258-
Assert.notNull(consumerGroup, "Property 'consumerGroup' is required");
259-
Assert.notNull(topic, "Property 'topic' is required");
260-
Assert.notNull(tag, "Property 'tag' is required");
258+
Assert.hasText(consumerGroup, "Property 'consumerGroup' is required");
259+
Assert.hasText(topic, "Property 'topic' is required");
260+
Assert.hasText(tag, "Property 'tag' is required");
261261
FilterExpression filterExpression = null;
262262
final ClientServiceProvider provider = ClientServiceProvider.loadService();
263263
if (StringUtils.hasLength(this.getTag())) {

0 commit comments

Comments
 (0)