mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
1. try执行后无catch 依然是return null
2. 变量后续没用到可定义到 try 内 3. 添加UP/DOWN 常量值
This commit is contained in:
@@ -132,7 +132,6 @@ public class DataSourcePropertiesConfiguration {
|
||||
if (!ObjectUtils.isEmpty(field.get(this))) {
|
||||
return field.getName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (IllegalAccessException e) {
|
||||
// won't happen
|
||||
|
@@ -86,9 +86,8 @@ public abstract class SentinelConverter<T extends Object>
|
||||
});
|
||||
|
||||
for (Object obj : sourceArray) {
|
||||
String item = null;
|
||||
try {
|
||||
item = objectMapper.writeValueAsString(obj);
|
||||
String item = objectMapper.writeValueAsString(obj);
|
||||
Optional.ofNullable(convertRule(item))
|
||||
.ifPresent(convertRule -> ruleCollection.add(convertRule));
|
||||
}
|
||||
|
Reference in New Issue
Block a user