From 16eea506d74a530781979852aff0ce699f124014 Mon Sep 17 00:00:00 2001 From: Harrison Date: Thu, 2 Jun 2022 09:24:49 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-72831=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E6=A3=80=E6=B5=8B-=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=AD=A3=E5=B8=B8=E7=9A=84=EF=BC=8C=E4=BD=86=E6=98=AF?= =?UTF-8?q?=E6=8A=9B=E5=87=BA=E5=BC=82=E5=B8=B8=E4=BA=86=20=E9=81=97?= =?UTF-8?q?=E6=BC=8F=E4=B8=80=E9=83=A8=E5=88=86=EF=BC=8C=E5=90=88=E4=B8=80?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/env/detect/impl/JarInconsistentDetector.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java b/designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java index 679671997b..b13195067b 100644 --- a/designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java +++ b/designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java @@ -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 remoteMap = groupBy(remoteInfos); MapDifference difference = Maps.difference(localMap, remoteMap); - Map diffInCommon = difference.entriesInCommon(); + // 获取本地远程不一样的部分 + Map> diffs = difference.entriesDiffering(); - if (diffInCommon.isEmpty()) { + if (diffs.isEmpty()) { return DetectorResult.normal(type()); } - Set inConsistentJars = diffInCommon.keySet(); + Set 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);