Fix: WebExecutorProperties npe problem. (#1162)

pull/1165/head
yanrongzhen 1 year ago committed by GitHub
parent c29a36fae4
commit be636bf08a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -117,14 +117,14 @@ public class ThreadPoolRunStateInfo extends ThreadPoolBaseInfo implements Serial
private Long timestamp;
public Integer getSimpleCurrentLoad() {
if (Objects.nonNull(getCurrentLoad())){
if (Objects.nonNull(getCurrentLoad())) {
return Integer.parseInt(getCurrentLoad().replace("%", ""));
}
return null;
}
public Integer getSimplePeakLoad() {
if (Objects.nonNull(getPeakLoad())){
if (Objects.nonNull(getPeakLoad())) {
return Integer.parseInt(getPeakLoad().replace("%", ""));
}
return null;

@ -70,6 +70,9 @@ public class ConfigModeNotifyConfigBuilder implements NotifyConfigBuilder {
}
// register notify config for web
WebExecutorProperties webProperties = configProperties.getWeb();
if (webProperties == null) {
return resultMap;
}
if (StringUtil.isBlank(webProperties.getThreadPoolId())) {
webProperties.setThreadPoolId(webThreadPoolService.getWebContainerType().name());
}

Loading…
Cancel
Save