xuxiaowei-com-cn commented on code in PR #8054:
URL: https://github.com/apache/incubator-seata/pull/8054#discussion_r3160242540
##########
console/src/main/java/org/apache/seata/mcp/tools/NameSpaceTools.java:
##########
@@ -44,14 +43,10 @@ public NameSpaceTools(ConsoleApiService mcpRPCService,
ObjectMapper objectMapper
public SingleResult<?> getTCNameSpaces() {
String result =
mcpRPCService.getCallNameSpace(RPCConstant.GET_NAMESPACE_PATH);
Map<String, Object> nameSpacesVo = new HashMap<>();
- try {
- JsonNode root = objectMapper.readTree(result);
- JsonNode dataNode = root.get("data");
- if (dataNode != null && !dataNode.isNull()) {
- nameSpacesVo.put("namespaces", dataNode.toString());
- }
- } catch (JsonProcessingException e) {
- return SingleResult.failure("Get namespace failed:" +
e.getMessage());
+ JsonNode root = objectMapper.readTree(result);
+ JsonNode dataNode = root.get("data");
+ if (dataNode != null && !dataNode.isNull()) {
+ nameSpacesVo.put("namespaces", dataNode.toString());
}
return SingleResult.success(nameSpacesVo);
Review Comment:
- fixed.
- 已修正。
##########
server/src/test/java/org/apache/seata/server/logging/AppenderTest.java:
##########
@@ -41,9 +40,10 @@ public static void init() {
System.setProperty("logging.extend.metric-appender.enabled", "true");
}
- @Test
+ // @Test
public void testAppenderEnabled() {
- LoggerContext lc = (LoggerContext)
StaticLoggerBinder.getSingleton().getLoggerFactory();
+ LoggerContext lc =
+ (LoggerContext)
ContextSelectorStaticBinder.getSingleton().getContextSelector();
Iterator<Appender<ILoggingEvent>> appenderIterator =
Review Comment:
- fixed.
- 已修正。
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]