fix(sj_beta2):
1、客户端重试组件异常空指针修复
This commit is contained in:
parent
a1ed75b1d4
commit
d383ed9be4
@ -4,6 +4,7 @@ import com.aizuda.snailjob.common.core.constant.SystemConstants;
|
|||||||
import com.aizuda.snailjob.server.model.dto.ConfigDTO;
|
import com.aizuda.snailjob.server.model.dto.ConfigDTO;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@ -49,9 +50,11 @@ public final class GroupVersionCache {
|
|||||||
|
|
||||||
public static ConfigDTO.Notify getRetryNotifyAttribute(Integer notifyScene) {
|
public static ConfigDTO.Notify getRetryNotifyAttribute(Integer notifyScene) {
|
||||||
List<ConfigDTO.Notify> notifyList = CONFIG.getNotifyList();
|
List<ConfigDTO.Notify> notifyList = CONFIG.getNotifyList();
|
||||||
for (ConfigDTO.Notify notify : notifyList) {
|
if (!CollectionUtils.isEmpty(notifyList)) {
|
||||||
if (notify.getRetryNotifyScene().equals(notifyScene)) {
|
for (ConfigDTO.Notify notify : notifyList) {
|
||||||
return notify;
|
if (Objects.nonNull(notify.getRetryNotifyScene()) && notify.getRetryNotifyScene().equals(notifyScene)) {
|
||||||
|
return notify;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,9 +64,11 @@ public final class GroupVersionCache {
|
|||||||
|
|
||||||
public static ConfigDTO.Notify getJobNotifyAttribute(Integer notifyScene) {
|
public static ConfigDTO.Notify getJobNotifyAttribute(Integer notifyScene) {
|
||||||
List<ConfigDTO.Notify> notifyList = CONFIG.getNotifyList();
|
List<ConfigDTO.Notify> notifyList = CONFIG.getNotifyList();
|
||||||
for (ConfigDTO.Notify notify : notifyList) {
|
if (!CollectionUtils.isEmpty(notifyList)) {
|
||||||
if (notify.getJobNotifyScene().equals(notifyScene)) {
|
for (ConfigDTO.Notify notify : notifyList) {
|
||||||
return notify;
|
if (Objects.nonNull(notify.getJobNotifyScene()) && notify.getJobNotifyScene().equals(notifyScene)) {
|
||||||
|
return notify;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user