File tree Expand file tree Collapse file tree
client/src/main/java/org/apache/rocketmq/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,11 +131,10 @@ public static void checkTopicConfig(final TopicConfig topicConfig) throws MQClie
131131 }
132132
133133 public static void checkBrokerConfig (final Properties brokerConfig ) throws MQClientException {
134- // TODO: use MixAll.isPropertyValid() when jdk upgrade to 1.8
135- if (brokerConfig .containsKey ("brokerPermission" )
136- && !PermName .isValid (brokerConfig .getProperty ("brokerPermission" ))) {
134+ String brokerPermission = brokerConfig .getProperty ("brokerPermission" );
135+ if (brokerPermission != null && !PermName .isValid (brokerPermission )) {
137136 throw new MQClientException (ResponseCode .NO_PERMISSION ,
138- String .format ("brokerPermission value: %s is invalid." , brokerConfig . getProperty ( " brokerPermission" ) ));
137+ String .format ("brokerPermission value: %s is invalid." , brokerPermission ));
139138 }
140139 }
141140}
You can’t perform that action at this time.
0 commit comments