diff --git a/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/impl/facade/SimpleGraphInfo.java b/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/impl/facade/SimpleGraphInfo.java index ec8f9ce678c4..fe3a20094693 100644 --- a/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/impl/facade/SimpleGraphInfo.java +++ b/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/impl/facade/SimpleGraphInfo.java @@ -82,12 +82,9 @@ public class SimpleGraphInfo implements PermanentGraphInfo { CommitId commit = permanentCommitsInfo.getCommitId(nodeId); List parents = ContainerUtil.newSmartList(); parents.addAll(ContainerUtil.mapNotNull(asLiteLinearGraph(linearGraph).getNodes(row, LiteLinearGraph.NodeFilter.DOWN), - new Function() { - @Override - public CommitId fun(Integer row) { - if (row < start || row >= end) return null; - return permanentCommitsInfo.getCommitId(linearGraph.getNodeId(row)); - } + row1 -> { + if (row1 < start || row1 >= end) return null; + return permanentCommitsInfo.getCommitId(linearGraph.getNodeId(row1)); })); graphCommits.add(new GraphCommitImpl<>(commit, parents, permanentCommitsInfo.getTimestamp(nodeId))); commitsIdMap.add(commit); @@ -110,12 +107,7 @@ public class SimpleGraphInfo implements PermanentGraphInfo { } } - ContainerUtil.sort(headNodeIndexes, new Comparator() { - @Override - public int compare(Integer o1, Integer o2) { - return layoutIndexes[o1] - layoutIndexes[o2]; - } - }); + ContainerUtil.sort(headNodeIndexes, Comparator.comparingInt(o -> layoutIndexes[o])); int[] starts = new int[headNodeIndexes.size()]; for (int i = 0; i < starts.length; i++) { starts[i] = layoutIndexes[headNodeIndexes.get(i)];