diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpRequest.java index 455b0f1db9b..6aa3dd9152e 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpRequest.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpRequest.java @@ -128,11 +128,7 @@ public class NettyHttpRequest implements HttpRequest { if (sValue == null) { return defaultValue; } - try { - return Boolean.valueOf(sValue); - } catch (NumberFormatException e) { - throw new ElasticSearchIllegalArgumentException("Failed to parse boolean parameter [" + key + "] with value [" + sValue + "]", e); - } + return sValue.equals("true") || sValue.equals("1"); } @Override public String param(String key) {