From 31fd196687b2b9108b12bb6c3464279502e2c77f Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 23 Sep 2010 20:06:42 +0200 Subject: [PATCH] doc the use of mapbuilder --- .../common/blobstore/fs/AbstractFsBlobContainer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/fs/AbstractFsBlobContainer.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/fs/AbstractFsBlobContainer.java index b6b2c80c329..b998905a147 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/fs/AbstractFsBlobContainer.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/fs/AbstractFsBlobContainer.java @@ -51,6 +51,7 @@ public abstract class AbstractFsBlobContainer extends AbstractBlobContainer { if (files == null || files.length == 0) { return ImmutableMap.of(); } + // using MapBuilder and not ImmutableMap.Builder as it seems like File#listFiles might return duplicate files! MapBuilder builder = MapBuilder.newMapBuilder(); for (File file : files) { if (file.isFile()) {