[vcs-log] lambdify

This commit is contained in:
Julia Beliaeva
2017-03-24 14:32:06 +03:00
parent 35a805dabe
commit 74a1553ac3
@@ -24,7 +24,6 @@ import com.intellij.openapi.util.Pair;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.Consumer;
import com.intellij.util.Function;
import com.intellij.util.NotNullFunction;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.UIUtil;
@@ -166,13 +165,7 @@ public class VcsLogRefresherImpl implements VcsLogRefresher {
@NotNull
private List<GraphCommit<Integer>> compactCommits(@NotNull List<? extends TimedVcsCommit> commits, @NotNull final VirtualFile root) {
StopWatch sw = StopWatch.start("compacting commits");
List<GraphCommit<Integer>> map = ContainerUtil.map(commits, new Function<TimedVcsCommit, GraphCommit<Integer>>() {
@NotNull
@Override
public GraphCommit<Integer> fun(@NotNull TimedVcsCommit commit) {
return compactCommit(commit, root);
}
});
List<GraphCommit<Integer>> map = ContainerUtil.map(commits, commit -> compactCommit(commit, root));
myStorage.flush();
sw.report();
return map;