vcs: Refactored "AreaMap" - removed unused methods, code simplified
[idea/community.git] / plugins / svn4idea / src / org / jetbrains / idea / svn / mergeinfo / OneShotMergeInfoHelper.java
index b1ecbbb10232d289313c664701a522615431e460..d574e7dfeae09b77c87ec2ddaf7fcaee4d7adf53 100644 (file)
@@ -65,8 +65,7 @@ public class OneShotMergeInfoHelper implements MergeChecker {
     myPartiallyMerged = newHashMap();
     myMergeInfoLock = new Object();
     // TODO: Rewrite without AreaMap usage
-    myMergeInfoMap =
-      AreaMap.create((parentUrl, childUrl) -> ".".equals(parentUrl) || isAncestor(ensureStartSlash(parentUrl), ensureStartSlash(childUrl)));
+    myMergeInfoMap = new AreaMap<>();
   }
 
   @Override
@@ -120,7 +119,10 @@ public class OneShotMergeInfoHelper implements MergeChecker {
       InfoProcessor processor = new InfoProcessor(sourceRelativePath, myMergeContext.getRepositoryRelativeSourcePath(), revisionNumber);
 
       synchronized (myMergeInfoLock) {
-        myMergeInfoMap.getSimiliar(toKey(sourceRelativePath), processor);
+        myMergeInfoMap.getSimiliar(
+          toKey(sourceRelativePath),
+          (parentUrl, childUrl) -> ".".equals(parentUrl) || isAncestor(ensureStartSlash(parentUrl), ensureStartSlash(childUrl)),
+          processor);
       }
 
       result = MergeCheckResult.getInstance(processor.isMerged());