From 1ff22fe32a06a2e84acd8be96d5f56e161efd787 Mon Sep 17 00:00:00 2001 From: javanna Date: Tue, 6 Sep 2016 16:14:16 +0200 Subject: [PATCH] remove bw comp layer that's not needed in CommonStatsFlags --- .../action/admin/indices/stats/CommonStatsFlags.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java b/core/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java index 89a520d3ea7..9bacbd2678e 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java +++ b/core/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java @@ -19,7 +19,6 @@ package org.elasticsearch.action.admin.indices.stats; -import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; @@ -63,11 +62,7 @@ public class CommonStatsFlags implements Writeable, Cloneable { groups = in.readStringArray(); fieldDataFields = in.readStringArray(); completionDataFields = in.readStringArray(); - if (in.getVersion().onOrAfter(Version.V_5_0_0_alpha1)) { - includeSegmentFileSizes = in.readBoolean(); - } else { - includeSegmentFileSizes = false; - } + includeSegmentFileSizes = in.readBoolean(); } @Override @@ -82,9 +77,7 @@ public class CommonStatsFlags implements Writeable, Cloneable { out.writeStringArrayNullable(groups); out.writeStringArrayNullable(fieldDataFields); out.writeStringArrayNullable(completionDataFields); - if (out.getVersion().onOrAfter(Version.V_5_0_0_alpha1)) { - out.writeBoolean(includeSegmentFileSizes); - } + out.writeBoolean(includeSegmentFileSizes); } /**