mawen12 opened a new issue, #9147: URL: https://github.com/apache/rocketmq/issues/9147
### Before Creating the Enhancement Request - [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature. ### Summary The method `checkConfig` in `DefaultMQPullConusmerImpl` and `DefaultMQPushConsumerImpl` exists unused code about producer group. `Validators#checkGroup` has checked the group not empty, so don't need to check in `checkConfig`. ```java public class DefaultMQPullConusmerImpl { // ... private void checkConfig() throws MQClientException { // because this method has check group not empty Validators.checkGroup(this.defaultMQPullConsumer.getConsumerGroup()); // this check should be unnecessary if (null == this.defaultMQPullConsumer.getConsumerGroup()) { throw new MQClientException( "consumerGroup is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // ... } // ... } ``` ```java public class Validators { // ... public static void checkGroup(String group) throws MQClientException { // check group is not null or empty if (UtilAll.isBlank(group)) { throw new MQClientException("the specified group is blank", null); } // ... } // ... } ``` ### Motivation producer group don't need repeat check. ### Describe the Solution You'd Like Delete unnecessary code. ### Describe Alternatives You've Considered No. ### Additional Context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org