Browse Source

REPORT-73292【设计器环境监测】缺少的jar在版本不一致中也会被检测到

处理不一致的逻辑,之前忘了判空
feature/x
Harrison 2 years ago
parent
commit
d567cf0a69
  1. 10
      designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java

10
designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java vendored

@ -114,7 +114,11 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
// 获取所有的不一致的 build
List<BuildInfo> inConsistentInfos = buildInfos.stream()
.filter((e) -> !StringUtils.equals(designerBuild.get(), e.getGroupBuild()))
.filter((e) -> {
// 不为空,且不相等
return StringUtils.isNotEmpty(e.getGroupBuild())
&& !StringUtils.equals(designerBuild.get(), e.getGroupBuild());
})
.collect(Collectors.toList());
// 没有直接返回
@ -141,7 +145,9 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
for (BuildInfo localInfo : localInfos) {
String jar = localInfo.getJar();
String groupContent = localInfo.getGroupBuild();
localMap.put(jar, groupContent);
if (StringUtils.isNotEmpty(groupContent)) {
localMap.put(jar, groupContent);
}
}
return localMap;
}

Loading…
Cancel
Save