CLUSTER_ALERTS_MANAGEMENT_SETTING =
Setting.affixKeySetting("xpack.monitoring.exporters.", "cluster_alerts.management.enabled",
- (key) -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope));
+ key -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope));
/**
* Every {@code Exporter} allows users to explicitly disable specific cluster alerts.
*
@@ -61,14 +61,14 @@ public abstract class Exporter implements AutoCloseable {
*/
public static final Setting.AffixSetting> CLUSTER_ALERTS_BLACKLIST_SETTING = Setting
.affixKeySetting("xpack.monitoring.exporters.", "cluster_alerts.management.blacklist",
- (key) -> Setting.listSetting(key, Collections.emptyList(), Function.identity(), Property.Dynamic, Property.NodeScope));
+ key -> Setting.listSetting(key, Collections.emptyList(), Function.identity(), Property.Dynamic, Property.NodeScope));
/**
* Every {@code Exporter} allows users to use a different index time format.
*/
private static final Setting.AffixSetting INDEX_NAME_TIME_FORMAT_SETTING =
Setting.affixKeySetting("xpack.monitoring.exporters.","index.name.time_format",
- (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope));
+ key -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope));
private static final String INDEX_FORMAT = "YYYY.MM.dd";
diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java
index f4f97df1d4fd8..af4a20d596cd0 100644
--- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java
+++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java
@@ -34,7 +34,7 @@ public class HttpSettings {
private static final String SSL_KEY_PREFIX = "xpack.http.ssl.";
static final Setting PROXY_HOST = Setting.simpleString(PROXY_HOST_KEY, Property.NodeScope);
- static final Setting PROXY_SCHEME = Setting.simpleString(PROXY_SCHEME_KEY, (v, s) -> Scheme.parse(v), Property.NodeScope);
+ static final Setting PROXY_SCHEME = Setting.simpleString(PROXY_SCHEME_KEY, Scheme::parse, Property.NodeScope);
static final Setting PROXY_PORT = Setting.intSetting(PROXY_PORT_KEY, 0, 0, 0xFFFF, Property.NodeScope);
static final Setting MAX_HTTP_RESPONSE_SIZE = Setting.byteSizeSetting("xpack.http.max_response_size",