Its only available in Java 6, and JGit still supports Java 5.
Change-Id: I6c8fac06106ffe20ac8b4b595f34e027f2d29cc2
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
package org.eclipse.jgit.treewalk;
import java.io.File;
+import java.util.SortedSet;
import java.util.TreeSet;
import org.eclipse.jgit.lib.ObjectReader;
@Override
public long getEntryLastModified() {
- Long cutOff = modTimes
- .floor(Long.valueOf(super.getEntryLastModified()));
- return (cutOff == null) ? 0 : cutOff;
+ Long cutOff = Long.valueOf(super.getEntryLastModified());
+ SortedSet<Long> head = modTimes.headSet(cutOff);
+ return head.isEmpty() ? 0 : head.last().longValue();
}
}