SortedMap<Long, Location> sortedFiles =
ImmutableSortedMap.copyOf(fileMetaDataManager.listFiles(loggingContext), Collections.<Long>reverseOrder());
if (sortedFiles.isEmpty()) {
return;
}
<BUG>long fromTimeMs = fromOffset.getTime() >= 0 ? fromOffset.getTime() - 1 : System.currentTimeMillis();
List<Location> tailFiles = Lists.newArrayListWithExpectedSize(sortedFiles.size());</BUG>
for (Map.Entry<Long, Location> entry : sortedFiles.entrySet()) {
<BUG>if (entry.getKey() <= fromTimeMs) {
tailFiles.add(entry.getValue());</BUG>
}

SortedMap<Long, Location> sortedFiles =
ImmutableSortedMap.copyOf(fileMetaDataManager.listFiles(loggingContext), Collections.<Long>reverseOrder());
if (sortedFiles.isEmpty()) {
return;
