Fix compilation issue with final assignment in lambda on windows jdk

Relates to #16097
This commit is contained in:
Christoph Büscher 2016-01-19 18:43:28 +01:00
parent 5c88164364
commit df5f1b1ee9
1 changed files with 3 additions and 2 deletions

View File

@ -30,8 +30,9 @@ final class AutoExpandReplicas {
// the value we recognize in the "max" position to mean all the nodes
private static final String ALL_NODES_VALUE = "all";
public static final Setting<AutoExpandReplicas> SETTING = new Setting<>(IndexMetaData.SETTING_AUTO_EXPAND_REPLICAS, "false", (value) -> {
final int min;
final int max;
// TODO change the following back to be final, https://github.com/elastic/elasticsearch/issues/16097
int min;
int max;
if (Booleans.parseBoolean(value, true) == false) {
return new AutoExpandReplicas(0, 0, false);
}