From 04cae88ff4547ee63f8012783b7146f3d846064f Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 30 May 2016 10:46:37 -0400 Subject: [PATCH] Do not use Lucene SuppressForbidden Lucene SuppressForbidden is marked lucene.internal and should not be used outside of Lucene. This commit removes the uses of this class within Elasticsearch. Instead, org.elasticsearch.common.SuppressForbidden should be used, which was already the case in most places. --- .../main/java/org/elasticsearch/bootstrap/BootstrapCheck.java | 2 +- .../main/java/org/elasticsearch/common/logging/Loggers.java | 2 +- core/src/main/java/org/elasticsearch/monitor/os/OsProbe.java | 2 +- .../org/elasticsearch/plugins/InstallPluginCommandTests.java | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java b/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java index 925940a3903..0ee5099dc69 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java @@ -20,7 +20,7 @@ package org.elasticsearch.bootstrap; import org.apache.lucene.util.Constants; -import org.apache.lucene.util.SuppressForbidden; +import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers; diff --git a/core/src/main/java/org/elasticsearch/common/logging/Loggers.java b/core/src/main/java/org/elasticsearch/common/logging/Loggers.java index a195ab450b5..674522589ae 100644 --- a/core/src/main/java/org/elasticsearch/common/logging/Loggers.java +++ b/core/src/main/java/org/elasticsearch/common/logging/Loggers.java @@ -19,8 +19,8 @@ package org.elasticsearch.common.logging; -import org.apache.lucene.util.SuppressForbidden; import org.elasticsearch.common.Classes; +import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; diff --git a/core/src/main/java/org/elasticsearch/monitor/os/OsProbe.java b/core/src/main/java/org/elasticsearch/monitor/os/OsProbe.java index 5ee2232068f..c6b4f080b91 100644 --- a/core/src/main/java/org/elasticsearch/monitor/os/OsProbe.java +++ b/core/src/main/java/org/elasticsearch/monitor/os/OsProbe.java @@ -20,7 +20,7 @@ package org.elasticsearch.monitor.os; import org.apache.lucene.util.Constants; -import org.apache.lucene.util.SuppressForbidden; +import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.monitor.Probes; diff --git a/qa/evil-tests/src/test/java/org/elasticsearch/plugins/InstallPluginCommandTests.java b/qa/evil-tests/src/test/java/org/elasticsearch/plugins/InstallPluginCommandTests.java index 2ca46b4effc..5c766018f13 100644 --- a/qa/evil-tests/src/test/java/org/elasticsearch/plugins/InstallPluginCommandTests.java +++ b/qa/evil-tests/src/test/java/org/elasticsearch/plugins/InstallPluginCommandTests.java @@ -23,10 +23,10 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Jimfs; import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.util.SuppressForbidden; import org.elasticsearch.Version; import org.elasticsearch.cli.MockTerminal; import org.elasticsearch.cli.UserError; +import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.io.PathUtilsForTesting; @@ -63,7 +63,6 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Function; -import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream;