Comparator<TreeNodeOnVcsRevision> () { final Comparator<VcsFileRevision> comparator = myBaseColumn.getComparator(); if (comparator == null) return null; return (o1, o2) -> { if (o1 == null) return -1; if (o2 == null) return 1; VcsFileRevision revision1 = o1.getRevision(); VcsFileRevision revision2 = o2.getRevision(); return comparator.compare(revision1, revision2); }; }