diff --git a/lucene/luke/src/java/org/apache/lucene/luke/models/commits/CommitsImpl.java b/lucene/luke/src/java/org/apache/lucene/luke/models/commits/CommitsImpl.java index 23cc68ae70b..f1dcf43547a 100644 --- a/lucene/luke/src/java/org/apache/lucene/luke/models/commits/CommitsImpl.java +++ b/lucene/luke/src/java/org/apache/lucene/luke/models/commits/CommitsImpl.java @@ -200,7 +200,7 @@ public final class CommitsImpl extends LukeModel implements Commits { if (dir == null) { return Collections.emptyMap(); } - return Map.copyOf(commitMap); + return new TreeMap<>(commitMap); } private SegmentInfos findSegmentInfos(long commitGen) throws LukeException, IOException {