Merge remote-tracking branch 'origin/master'
[idea/community.git] / platform / vcs-impl / src / com / intellij / openapi / vcs / changes / committed / ChangesCacheFile.java
index 5891b340dc97f8be0347226bd9857d72837dd3a0..ed5c664561a193ffe4295a2e7bbe5b71892034eb 100644 (file)
@@ -17,7 +17,6 @@ package com.intellij.openapi.vcs.changes.committed;
 
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
 
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.util.Comparing;
 import com.intellij.openapi.util.Condition;
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.util.Condition;
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.io.FileUtil;
@@ -140,11 +139,7 @@ public class ChangesCacheFile {
 
   public List<CommittedChangeList> writeChanges(final List<CommittedChangeList> changes) throws IOException {
     // the list and index are sorted in direct chronological order
 
   public List<CommittedChangeList> writeChanges(final List<CommittedChangeList> changes) throws IOException {
     // the list and index are sorted in direct chronological order
-    Collections.sort(changes, new Comparator<CommittedChangeList>() {
-      public int compare(final CommittedChangeList o1, final CommittedChangeList o2) {
-        return Comparing.compare(o1.getCommitDate(), o2.getCommitDate());
-      }
-    });
+    Collections.sort(changes, CommittedChangeListByDateComparator.ASCENDING);
     return writeChanges(changes, null);
   }
 
     return writeChanges(changes, null);
   }