From d65e9e9bea09cc3752b078f1dee48aac613807e0 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Fri, 16 May 2014 15:57:42 +0200 Subject: [PATCH] Add some finals where appropriate --- src/main/java/org/elasticsearch/cluster/ClusterState.java | 2 +- .../java/org/elasticsearch/index/fielddata/IndexFieldData.java | 2 +- .../org/elasticsearch/search/aggregations/BucketCollector.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/elasticsearch/cluster/ClusterState.java b/src/main/java/org/elasticsearch/cluster/ClusterState.java index f7e8f86962b..fec5fa486af 100644 --- a/src/main/java/org/elasticsearch/cluster/ClusterState.java +++ b/src/main/java/org/elasticsearch/cluster/ClusterState.java @@ -92,7 +92,7 @@ public class ClusterState implements ToXContent { } } - public static Map customFactories = new HashMap<>(); + private final static Map customFactories = new HashMap<>(); /** * Register a custom index meta data factory. Make sure to call it from a static block. diff --git a/src/main/java/org/elasticsearch/index/fielddata/IndexFieldData.java b/src/main/java/org/elasticsearch/index/fielddata/IndexFieldData.java index 9066bca224b..2297f483d29 100644 --- a/src/main/java/org/elasticsearch/index/fielddata/IndexFieldData.java +++ b/src/main/java/org/elasticsearch/index/fielddata/IndexFieldData.java @@ -41,7 +41,7 @@ import org.elasticsearch.indices.fielddata.breaker.CircuitBreakerService; public interface IndexFieldData extends IndexComponent { public static class CommonSettings { - public static String SETTING_MEMORY_STORAGE_HINT = "memory_storage_hint"; + public static final String SETTING_MEMORY_STORAGE_HINT = "memory_storage_hint"; public enum MemoryStorageFormat { ORDINALS, PACKED, PAGED; diff --git a/src/main/java/org/elasticsearch/search/aggregations/BucketCollector.java b/src/main/java/org/elasticsearch/search/aggregations/BucketCollector.java index 3620c88417d..24758135db5 100644 --- a/src/main/java/org/elasticsearch/search/aggregations/BucketCollector.java +++ b/src/main/java/org/elasticsearch/search/aggregations/BucketCollector.java @@ -31,7 +31,7 @@ import java.io.IOException; */ public abstract class BucketCollector implements ReaderContextAware { - public static BucketCollector NO_OP_COLLECTOR = new BucketCollector() { + public final static BucketCollector NO_OP_COLLECTOR = new BucketCollector() { @Override public void collect(int docId, long bucketOrdinal) throws IOException {