From 59af76e5941c9622fb56a8d42d75f53905c7943f Mon Sep 17 00:00:00 2001 From: Sandesh Kumar Date: Thu, 8 Jun 2023 12:29:54 -0700 Subject: [PATCH] Spotless fix Signed-off-by: Sandesh Kumar --- .../main/java/org/opensearch/cluster/metadata/Metadata.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java b/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java index 9520d939f737e..ac99c5c3b4f1d 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java @@ -1160,7 +1160,7 @@ public Builder(Metadata metadata) { this.indicesPreviousState = new HashMap<>(metadata.indices); // required for comparing with updated indices this.templates = new HashMap<>(metadata.templates); this.customs = new HashMap<>(metadata.customs); - dataStreamPreviousMetadata = (DataStreamMetadata) metadata.customs.get(DataStreamMetadata.TYPE); + this.dataStreamPreviousMetadata = (DataStreamMetadata) metadata.customs.get(DataStreamMetadata.TYPE); this.indicesLookup = new TreeMap<>(metadata.indicesLookup); this.allIndices = Arrays.copyOf(metadata.allIndices, metadata.allIndices.length); this.visibleIndices = Arrays.copyOf(metadata.visibleIndices, metadata.visibleIndices.length); @@ -1453,7 +1453,8 @@ public Builder generateClusterUuidIfNeeded() { public Metadata build() { TimeValue buildStartTime = TimeValue.timeValueMillis(System.nanoTime()); - boolean recomputeRequired = indices.equals(indicesPreviousState) == false || dataStreamPreviousMetadata.equals(this.customs.get(DataStreamMetadata.TYPE)) == false; + boolean recomputeRequired = indices.equals(indicesPreviousState) == false + || dataStreamPreviousMetadata.equals(this.customs.get(DataStreamMetadata.TYPE)) == false; TimeValue recomputeEndTime = TimeValue.timeValueMillis(System.nanoTime()); logger.info( "Recompute required: {}, time taken for comparing indices: {} ms",