Browse Source

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

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

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

@ -114,7 +114,11 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
// 获取所有的不一致的 build // 获取所有的不一致的 build
List<BuildInfo> inConsistentInfos = buildInfos.stream() 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()); .collect(Collectors.toList());
// 没有直接返回 // 没有直接返回
@ -141,8 +145,10 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
for (BuildInfo localInfo : localInfos) { for (BuildInfo localInfo : localInfos) {
String jar = localInfo.getJar(); String jar = localInfo.getJar();
String groupContent = localInfo.getGroupBuild(); String groupContent = localInfo.getGroupBuild();
if (StringUtils.isNotEmpty(groupContent)) {
localMap.put(jar, groupContent); localMap.put(jar, groupContent);
} }
}
return localMap; return localMap;
} }

Loading…
Cancel
Save