zf-ship opened a new issue, #391:
URL: https://github.com/apache/rocketmq-dashboard/issues/391
@Override
public List<TopicConfigInfo> examineTopicConfig(String topic) {
List<TopicConfigInfo> topicConfigInfoList = Lists.newArrayList();
TopicRouteData topicRouteData = route(topic);
for (BrokerData brokerData : topicRouteData.getBrokerDatas()) {
TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
TopicConfig topicConfig = examineTopicConfig(topic,
brokerData.getBrokerName());
BeanUtils.copyProperties(topicConfig, topicConfigInfo);// # 这里报错
topicConfigInfo.setBrokerNameList(Lists.newArrayList(brokerData.getBrokerName()));
String messageType =
topicConfig.getAttributes().get(TOPIC_MESSAGE_TYPE_ATTRIBUTE.getName());
if (StringUtils.isBlank(messageType)) {
messageType = TopicMessageType.UNSPECIFIED.name();
}
topicConfigInfo.setMessageType(messageType);
topicConfigInfoList.add(topicConfigInfo);
}
return topicConfigInfoList;
}
可否这样调整
@Override
public List<TopicConfigInfo> examineTopicConfig(String topic) {
List<TopicConfigInfo> topicConfigInfoList = Lists.newArrayList();
TopicRouteData topicRouteData = route(topic);
for (BrokerData brokerData : topicRouteData.getBrokerDatas()) {
TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
TopicConfig topicConfig = examineTopicConfig(topic,
brokerData.getBrokerName());
topicConfigInfo.setBrokerNameList(Lists.newArrayList(brokerData.getBrokerName()));
if (topicConfig == null) {
log.warn("TopicConfig is null
,topic:{},brokerData:{}",topic,brokerData);
String messageType = TopicMessageType.UNSPECIFIED.name();
topicConfigInfo.setMessageType(messageType);
} else {
BeanUtils.copyProperties(topicConfig, topicConfigInfo);
String messageType =
topicConfig.getAttributes().get(TOPIC_MESSAGE_TYPE_ATTRIBUTE.getName());
if (StringUtils.isBlank(messageType)) {
messageType = TopicMessageType.UNSPECIFIED.name();
}
topicConfigInfo.setMessageType(messageType);
}
topicConfigInfoList.add(topicConfigInfo);
}
return topicConfigInfoList;
}
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]