diff --git a/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java b/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java index 17b43ee60d..c9c33023a9 100644 --- a/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java +++ b/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java @@ -1705,7 +1705,9 @@ private void retrieveModelChunks(MLModel mlModelMeta, ActionListener liste chunkFiles.put(currentChunk, new File(chunkPath.toUri())); retrievedChunks.getAndIncrement(); if (retrievedChunks.get() == totalChunks) { - Queue orderedChunkFiles = chunkFiles.entrySet().stream() + Queue orderedChunkFiles = chunkFiles + .entrySet() + .stream() .sorted(Map.Entry.comparingByKey()) .map(Map.Entry::getValue) .collect(Collectors.toCollection(LinkedList::new));