@ -54,7 +54,6 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
if ( WorkContext . getCurrent ( ) . isLocal ( ) ) {
if ( WorkContext . getCurrent ( ) . isLocal ( ) ) {
return detectLocal ( ) ;
return detectLocal ( ) ;
} else {
} else {
return detectLocalAndRemote ( ) ;
return detectLocalAndRemote ( ) ;
}
}
@ -75,13 +74,14 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
Map < String , String > remoteMap = groupBy ( remoteInfos ) ;
Map < String , String > remoteMap = groupBy ( remoteInfos ) ;
MapDifference < String , String > difference = Maps . difference ( localMap , remoteMap ) ;
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 ( ) ) ;
return DetectorResult . normal ( type ( ) ) ;
}
}
Set < String > inConsistentJars = diffInCommon . keySet ( ) ;
Set < String > inConsistentJars = diffs . keySet ( ) ;
String message = StringUtils . join ( inConsistentJars , SEPARATOR ) ;
String message = StringUtils . join ( inConsistentJars , SEPARATOR ) ;
Message . Simple tipsMessage = new Message . Simple ( Toolkit . i18nText ( "Fine_Design_Basic_Detect_Server" ) + Toolkit . i18nText ( type ( ) . getTipsLocale ( ) ) + message ) ;
Message . Simple tipsMessage = new Message . Simple ( Toolkit . i18nText ( "Fine_Design_Basic_Detect_Server" ) + Toolkit . i18nText ( type ( ) . getTipsLocale ( ) ) + message ) ;