|
|
|
@ -54,7 +54,6 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
|
|
|
|
|
|
|
|
|
|
if (WorkContext.getCurrent().isLocal()) { |
|
|
|
|
return detectLocal(); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
return detectLocalAndRemote(); |
|
|
|
|
} |
|
|
|
@ -75,13 +74,14 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
|
|
|
|
|
Map<String, String> remoteMap = groupBy(remoteInfos); |
|
|
|
|
|
|
|
|
|
MapDifference<String, String> difference = Maps.difference(localMap, remoteMap); |
|
|
|
|
Map<String, String> diffInCommon = difference.entriesInCommon(); |
|
|
|
|
// 获取本地远程不一样的部分
|
|
|
|
|
Map<String, MapDifference.ValueDifference<String>> diffs = difference.entriesDiffering(); |
|
|
|
|
|
|
|
|
|
if (diffInCommon.isEmpty()) { |
|
|
|
|
if (diffs.isEmpty()) { |
|
|
|
|
return DetectorResult.normal(type()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Set<String> inConsistentJars = diffInCommon.keySet(); |
|
|
|
|
Set<String> inConsistentJars = diffs.keySet(); |
|
|
|
|
|
|
|
|
|
String message = StringUtils.join(inConsistentJars, SEPARATOR); |
|
|
|
|
Message.Simple tipsMessage = new Message.Simple(Toolkit.i18nText("Fine_Design_Basic_Detect_Server") + Toolkit.i18nText(type().getTipsLocale()) + message); |
|
|
|
|