From 05aa1d90b84697f9a489b03f50fd66192fdadba7 Mon Sep 17 00:00:00 2001 From: Jim Hooker Date: Sat, 29 Aug 2015 07:43:17 +0100 Subject: [PATCH] Extend AbstractComponent and remove logger --- .../action/support/DestructiveOperations.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/support/DestructiveOperations.java b/core/src/main/java/org/elasticsearch/action/support/DestructiveOperations.java index 5452a4a7519..b73ee8a75fd 100644 --- a/core/src/main/java/org/elasticsearch/action/support/DestructiveOperations.java +++ b/core/src/main/java/org/elasticsearch/action/support/DestructiveOperations.java @@ -19,27 +19,25 @@ package org.elasticsearch.action.support; +import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.logging.ESLogger; -import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.node.settings.NodeSettingsService; /** * Helper for dealing with destructive operations and wildcard usage. */ -public final class DestructiveOperations implements NodeSettingsService.Listener { +public final class DestructiveOperations extends AbstractComponent implements NodeSettingsService.Listener { /** * Setting which controls whether wildcard usage (*, prefix*, _all) is allowed. */ public static final String REQUIRES_NAME = "action.destructive_requires_name"; - - private final ESLogger logger = Loggers.getLogger(DestructiveOperations.class); private volatile boolean destructiveRequiresName; @Inject public DestructiveOperations(Settings settings, NodeSettingsService nodeSettingsService) { + super(settings); destructiveRequiresName = settings.getAsBoolean(DestructiveOperations.REQUIRES_NAME, false); nodeSettingsService.addListener(this); }