From 188953922a1c7e7b28488d0c2f6107a8212e61a3 Mon Sep 17 00:00:00 2001 From: javanna Date: Tue, 22 Dec 2015 11:22:47 +0100 Subject: [PATCH] adapt to upstream changes Removed wildcard imports and fixed two broken license headers --- .../elasticsearch/ingest/IngestDocument.java | 8 ++++++- .../org/elasticsearch/ingest/Pipeline.java | 7 ++++-- .../org/elasticsearch/ingest/ValueSource.java | 6 ++++- .../processor/AbstractStringProcessor.java | 3 --- .../ingest/processor/Processor.java | 3 --- .../processor/convert/ConvertProcessor.java | 5 ++++- .../ingest/processor/date/DateProcessor.java | 6 ++++- .../processor/geoip/GeoIpProcessor.java | 21 +++++++++++++++--- .../ingest/processor/grok/Grok.java | 16 ++++++++------ .../ingest/processor/grok/GrokMatchGroup.java | 5 ----- .../ingest/processor/join/JoinProcessor.java | 1 - .../lowercase/LowercaseProcessor.java | 1 - .../processor/rename/RenameProcessor.java | 2 -- .../processor/split/SplitProcessor.java | 1 - .../ingest/processor/trim/TrimProcessor.java | 2 -- .../uppercase/UppercaseProcessor.java | 1 - .../plugin/ingest/IngestModule.java | 2 +- .../ingest/InternalTemplateService.java | 6 ++++- .../plugin/ingest/PipelineDefinition.java | 1 - .../plugin/ingest/PipelineStore.java | 6 ++++- .../plugin/ingest/rest/IngestRestFilter.java | 8 +++++-- .../ingest/transport/IngestActionFilter.java | 8 +++++-- .../delete/DeletePipelineTransportAction.java | 2 +- .../transport/get/GetPipelineResponse.java | 5 ----- .../get/GetPipelineTransportAction.java | 2 +- .../put/PutPipelineTransportAction.java | 2 +- .../reload/ReloadPipelinesAction.java | 8 ++++++- .../SimulatePipelineTransportAction.java | 2 +- .../elasticsearch/ingest/IngestClientIT.java | 5 ++++- .../ingest/IngestDocumentTests.java | 13 +++++++++-- .../ingest/RandomDocumentPicks.java | 7 +++++- .../ingest/ValueSourceTests.java | 10 +++++++-- .../AbstractStringProcessorTestCase.java | 2 -- .../processor/ConfigurationUtilsTests.java | 8 +++++-- .../convert/ConvertProcessorFactoryTests.java | 1 - .../convert/ConvertProcessorTests.java | 7 +++++- .../date/DateProcessorFactoryTests.java | 22 ++++++++++++------- .../processor/date/DateProcessorTests.java | 21 +++++++++++------- .../geoip/GeoIpProcessorFactoryTests.java | 10 +++++++-- .../processor/grok/GrokProcessorTests.java | 5 +++-- .../ingest/processor/grok/GrokTests.java | 7 +++--- .../gsub/GsubProcessorFactoryTests.java | 2 -- .../processor/gsub/GsubProcessorTests.java | 2 -- .../processor/join/JoinProcessorTests.java | 5 ++++- .../LowercaseProcessorFactoryTests.java | 2 -- .../lowercase/LowercaseProcessorTests.java | 1 - .../rename/RenameProcessorFactoryTests.java | 1 - .../rename/RenameProcessorTests.java | 6 ++++- .../processor/set/SetProcessorTests.java | 8 +++++-- .../split/SplitProcessorFactoryTests.java | 1 - .../processor/split/SplitProcessorTests.java | 5 ++++- .../trim/TrimProcessorFactoryTests.java | 2 -- .../UppercaseProcessorFactoryTests.java | 2 -- .../uppercase/UppercaseProcessorTests.java | 1 - .../ingest/IngestBootstrapperTests.java | 15 +++++++++++-- .../ingest/PipelineExecutionServiceTests.java | 14 ++++++++++-- .../plugin/ingest/PipelineStoreTests.java | 1 - .../transport/IngestActionFilterTests.java | 15 +++++++++---- .../reload/ReloadPipelinesActionTests.java | 2 +- .../SimulateExecutionServiceTests.java | 12 ++++++++-- .../SimulatePipelineRequestParsingTests.java | 11 ++++++++-- .../SimulatePipelineResponseTests.java | 4 +++- 62 files changed, 248 insertions(+), 122 deletions(-) diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/IngestDocument.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/IngestDocument.java index a14a2647fd4..d721f00d284 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/IngestDocument.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/IngestDocument.java @@ -23,7 +23,13 @@ import org.elasticsearch.common.Strings; import java.text.DateFormat; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.TimeZone; /** * Represents a single document being captured before indexing and holds the source and metadata (like id, type and index). diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/Pipeline.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/Pipeline.java index 4fb26bc7ab0..7c92e4bbd53 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/Pipeline.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/Pipeline.java @@ -23,8 +23,11 @@ package org.elasticsearch.ingest; import org.elasticsearch.ingest.processor.ConfigurationUtils; import org.elasticsearch.ingest.processor.Processor; -import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; /** * A pipeline is a list of {@link Processor} instances grouped under a unique id. diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/ValueSource.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/ValueSource.java index 525bb722d60..45f03d01130 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/ValueSource.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/ValueSource.java @@ -19,7 +19,11 @@ package org.elasticsearch.ingest; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; /** * Holds a value. If the value is requested a copy is made and optionally template snippets are resolved too. diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/AbstractStringProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/AbstractStringProcessor.java index 475ace15552..2769a1dd419 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/AbstractStringProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/AbstractStringProcessor.java @@ -21,9 +21,6 @@ package org.elasticsearch.ingest.processor; import org.elasticsearch.ingest.IngestDocument; -import java.util.Collection; -import java.util.Collections; -import java.util.List; import java.util.Map; /** diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/Processor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/Processor.java index d9c788ba21e..36bcf9689a6 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/Processor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/Processor.java @@ -22,9 +22,6 @@ package org.elasticsearch.ingest.processor; import org.elasticsearch.ingest.IngestDocument; -import java.io.Closeable; -import java.io.IOException; -import java.nio.file.Path; import java.util.Map; /** diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/convert/ConvertProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/convert/ConvertProcessor.java index 0944305c8b6..4ef2663101e 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/convert/ConvertProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/convert/ConvertProcessor.java @@ -23,7 +23,10 @@ import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.ingest.processor.ConfigurationUtils; import org.elasticsearch.ingest.processor.Processor; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.Map; /** * Processor that converts fields content to a different type. Supported types are: integer, float, boolean and string. diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/date/DateProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/date/DateProcessor.java index 35fcc044f42..0f2be638710 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/date/DateProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/date/DateProcessor.java @@ -26,7 +26,11 @@ import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.ISODateTimeFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Optional; import java.util.function.Function; public final class DateProcessor implements Processor { diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessor.java index 50ac93ac491..30ca9541a4d 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessor.java @@ -23,7 +23,11 @@ import com.maxmind.geoip2.DatabaseReader; import com.maxmind.geoip2.exception.AddressNotFoundException; import com.maxmind.geoip2.model.CityResponse; import com.maxmind.geoip2.model.CountryResponse; -import com.maxmind.geoip2.record.*; +import com.maxmind.geoip2.record.City; +import com.maxmind.geoip2.record.Continent; +import com.maxmind.geoip2.record.Country; +import com.maxmind.geoip2.record.Location; +import com.maxmind.geoip2.record.Subdivision; import org.apache.lucene.util.IOUtils; import org.elasticsearch.SpecialPermission; import org.elasticsearch.common.network.NetworkAddress; @@ -35,10 +39,21 @@ import java.io.IOException; import java.io.InputStream; import java.net.InetAddress; import java.net.UnknownHostException; -import java.nio.file.*; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.PathMatcher; +import java.nio.file.StandardOpenOption; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; import java.util.stream.Stream; import static org.elasticsearch.ingest.processor.ConfigurationUtils.readOptionalList; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/Grok.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/Grok.java index 94e5d22fc98..bfad4e7e319 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/Grok.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/Grok.java @@ -19,19 +19,21 @@ package org.elasticsearch.ingest.processor.grok; -import java.lang.Object; -import java.lang.String; -import java.lang.StringIndexOutOfBoundsException; +import org.jcodings.specific.UTF8Encoding; +import org.joni.Matcher; +import org.joni.NameEntry; +import org.joni.Option; +import org.joni.Regex; +import org.joni.Region; +import org.joni.Syntax; +import org.joni.exception.ValueException; + import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Map; -import org.jcodings.specific.UTF8Encoding; -import org.joni.*; -import org.joni.exception.ValueException; - final class Grok { private static final String NAME_GROUP = "name"; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/GrokMatchGroup.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/GrokMatchGroup.java index 86ddd6974fe..f44d758d7b8 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/GrokMatchGroup.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/grok/GrokMatchGroup.java @@ -19,11 +19,6 @@ package org.elasticsearch.ingest.processor.grok; -import java.lang.Float; -import java.lang.Integer; -import java.lang.Object; -import java.lang.String; - final class GrokMatchGroup { private static final String DEFAULT_TYPE = "string"; private final String patternName; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/join/JoinProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/join/JoinProcessor.java index 85be2316777..542c536786b 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/join/JoinProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/join/JoinProcessor.java @@ -23,7 +23,6 @@ import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.ingest.processor.ConfigurationUtils; import org.elasticsearch.ingest.processor.Processor; -import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessor.java index 6bff6223053..e1d6cf222ad 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessor.java @@ -21,7 +21,6 @@ package org.elasticsearch.ingest.processor.lowercase; import org.elasticsearch.ingest.processor.AbstractStringProcessor; -import java.util.Collection; import java.util.Locale; /** diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/rename/RenameProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/rename/RenameProcessor.java index 7e894e53893..bc340db8275 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/rename/RenameProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/rename/RenameProcessor.java @@ -23,8 +23,6 @@ import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.ingest.processor.ConfigurationUtils; import org.elasticsearch.ingest.processor.Processor; -import java.util.Arrays; -import java.util.Collections; import java.util.Map; /** diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/split/SplitProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/split/SplitProcessor.java index 1895fc10d37..a95c70cb66f 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/split/SplitProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/split/SplitProcessor.java @@ -24,7 +24,6 @@ import org.elasticsearch.ingest.processor.ConfigurationUtils; import org.elasticsearch.ingest.processor.Processor; import java.util.Arrays; -import java.util.Collections; import java.util.Map; /** diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/trim/TrimProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/trim/TrimProcessor.java index 94b617ba41e..8ed3afefe88 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/trim/TrimProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/trim/TrimProcessor.java @@ -21,8 +21,6 @@ package org.elasticsearch.ingest.processor.trim; import org.elasticsearch.ingest.processor.AbstractStringProcessor; -import java.util.Collection; - /** * Processor that trims the content of string fields. * Throws exception is the field is not of type string. diff --git a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessor.java b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessor.java index fe0d029cf3c..a599f6cf32a 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessor.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessor.java @@ -21,7 +21,6 @@ package org.elasticsearch.ingest.processor.uppercase; import org.elasticsearch.ingest.processor.AbstractStringProcessor; -import java.util.Collection; import java.util.Locale; /** diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestModule.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestModule.java index fec0f3877ee..53bfea9e00d 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestModule.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestModule.java @@ -21,7 +21,6 @@ package org.elasticsearch.plugin.ingest; import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.common.inject.multibindings.MapBinder; -import org.elasticsearch.ingest.processor.set.SetProcessor; import org.elasticsearch.ingest.processor.convert.ConvertProcessor; import org.elasticsearch.ingest.processor.date.DateProcessor; import org.elasticsearch.ingest.processor.geoip.GeoIpProcessor; @@ -31,6 +30,7 @@ import org.elasticsearch.ingest.processor.join.JoinProcessor; import org.elasticsearch.ingest.processor.lowercase.LowercaseProcessor; import org.elasticsearch.ingest.processor.remove.RemoveProcessor; import org.elasticsearch.ingest.processor.rename.RenameProcessor; +import org.elasticsearch.ingest.processor.set.SetProcessor; import org.elasticsearch.ingest.processor.split.SplitProcessor; import org.elasticsearch.ingest.processor.trim.TrimProcessor; import org.elasticsearch.ingest.processor.uppercase.UppercaseProcessor; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/InternalTemplateService.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/InternalTemplateService.java index cec07f40459..58bcfc0a269 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/InternalTemplateService.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/InternalTemplateService.java @@ -21,7 +21,11 @@ package org.elasticsearch.plugin.ingest; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.ingest.TemplateService; -import org.elasticsearch.script.*; +import org.elasticsearch.script.CompiledScript; +import org.elasticsearch.script.ExecutableScript; +import org.elasticsearch.script.Script; +import org.elasticsearch.script.ScriptContext; +import org.elasticsearch.script.ScriptService; import java.util.Collections; import java.util.Map; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineDefinition.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineDefinition.java index d78274ce7f6..f8e94463327 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineDefinition.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineDefinition.java @@ -22,7 +22,6 @@ package org.elasticsearch.plugin.ingest; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java index bb6007170cb..ba59d8af314 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/PipelineStore.java @@ -54,7 +54,11 @@ import org.elasticsearch.transport.TransportService; import java.io.Closeable; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class PipelineStore extends AbstractComponent implements Closeable { diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/rest/IngestRestFilter.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/rest/IngestRestFilter.java index fe7af03b0ae..0c548888ab2 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/rest/IngestRestFilter.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/rest/IngestRestFilter.java @@ -20,9 +20,13 @@ package org.elasticsearch.plugin.ingest.rest; import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.rest.*; +import org.elasticsearch.rest.RestChannel; +import org.elasticsearch.rest.RestController; +import org.elasticsearch.rest.RestFilter; +import org.elasticsearch.rest.RestFilterChain; +import org.elasticsearch.rest.RestRequest; -import static org.elasticsearch.plugin.ingest.IngestPlugin.*; +import static org.elasticsearch.plugin.ingest.IngestPlugin.PIPELINE_ID_PARAM; import static org.elasticsearch.plugin.ingest.IngestPlugin.PIPELINE_ID_PARAM_CONTEXT_KEY; public class IngestRestFilter extends RestFilter { diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilter.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilter.java index 62249552367..b91dd34a206 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilter.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilter.java @@ -31,11 +31,15 @@ import org.elasticsearch.action.support.ActionFilterChain; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.plugin.ingest.IngestBootstrapper; import org.elasticsearch.plugin.ingest.IngestPlugin; import org.elasticsearch.plugin.ingest.PipelineExecutionService; -import org.elasticsearch.plugin.ingest.IngestBootstrapper; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; public final class IngestActionFilter extends AbstractComponent implements ActionFilter { diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/delete/DeletePipelineTransportAction.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/delete/DeletePipelineTransportAction.java index b5e899ef519..8a472d9a527 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/delete/DeletePipelineTransportAction.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/delete/DeletePipelineTransportAction.java @@ -26,8 +26,8 @@ import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugin.ingest.PipelineStore; import org.elasticsearch.plugin.ingest.IngestBootstrapper; +import org.elasticsearch.plugin.ingest.PipelineStore; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineResponse.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineResponse.java index 8d7bf9cc258..3508f6c0c55 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineResponse.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineResponse.java @@ -20,21 +20,16 @@ package org.elasticsearch.plugin.ingest.transport.get; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.StatusToXContent; -import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.plugin.ingest.PipelineDefinition; import org.elasticsearch.rest.RestStatus; import java.io.IOException; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; public class GetPipelineResponse extends ActionResponse implements StatusToXContent { diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineTransportAction.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineTransportAction.java index 47606149e01..e3b00697b16 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineTransportAction.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/get/GetPipelineTransportAction.java @@ -25,9 +25,9 @@ import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.plugin.ingest.IngestBootstrapper; import org.elasticsearch.plugin.ingest.PipelineDefinition; import org.elasticsearch.plugin.ingest.PipelineStore; -import org.elasticsearch.plugin.ingest.IngestBootstrapper; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/put/PutPipelineTransportAction.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/put/PutPipelineTransportAction.java index 646244f95d5..9de4107c7db 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/put/PutPipelineTransportAction.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/put/PutPipelineTransportAction.java @@ -26,8 +26,8 @@ import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugin.ingest.PipelineStore; import org.elasticsearch.plugin.ingest.IngestBootstrapper; +import org.elasticsearch.plugin.ingest.PipelineStore; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesAction.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesAction.java index acd54240b27..8a9a15c221c 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesAction.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesAction.java @@ -25,7 +25,13 @@ import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugin.ingest.PipelineStore; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.*; +import org.elasticsearch.transport.TransportChannel; +import org.elasticsearch.transport.TransportException; +import org.elasticsearch.transport.TransportRequest; +import org.elasticsearch.transport.TransportRequestHandler; +import org.elasticsearch.transport.TransportResponse; +import org.elasticsearch.transport.TransportResponseHandler; +import org.elasticsearch.transport.TransportService; import java.util.ArrayList; import java.util.List; diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineTransportAction.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineTransportAction.java index 682a03f21e7..dcff1e0e7f7 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineTransportAction.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineTransportAction.java @@ -26,8 +26,8 @@ import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentHelper; -import org.elasticsearch.plugin.ingest.PipelineStore; import org.elasticsearch.plugin.ingest.IngestBootstrapper; +import org.elasticsearch.plugin.ingest.PipelineStore; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestClientIT.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestClientIT.java index 1ab97961903..3239298143b 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestClientIT.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestClientIT.java @@ -51,7 +51,10 @@ import java.util.Map; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.Is.is; public class IngestClientIT extends ESIntegTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestDocumentTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestDocumentTests.java index 011d47c67ed..a0067dc9659 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestDocumentTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/IngestDocumentTests.java @@ -22,9 +22,18 @@ package org.elasticsearch.ingest; import org.elasticsearch.test.ESTestCase; import org.junit.Before; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.both; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; public class IngestDocumentTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/RandomDocumentPicks.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/RandomDocumentPicks.java index 73a5395fd63..5699cab7cfa 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/RandomDocumentPicks.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/RandomDocumentPicks.java @@ -24,7 +24,12 @@ import com.carrotsearch.randomizedtesting.generators.RandomPicks; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import org.elasticsearch.common.Strings; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.TreeMap; public final class RandomDocumentPicks { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/ValueSourceTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/ValueSourceTests.java index 1c3f7dc3120..f21f1f2ad44 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/ValueSourceTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/ValueSourceTests.java @@ -21,9 +21,15 @@ package org.elasticsearch.ingest; import org.elasticsearch.test.ESTestCase; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.sameInstance; public class ValueSourceTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/AbstractStringProcessorTestCase.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/AbstractStringProcessorTestCase.java index 6bb2f9dd0dc..0d5f21ff712 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/AbstractStringProcessorTestCase.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/AbstractStringProcessorTestCase.java @@ -23,10 +23,8 @@ import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.test.ESTestCase; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; -import java.util.Map; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/ConfigurationUtilsTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/ConfigurationUtilsTests.java index 38c4e2493a2..b661a598edf 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/ConfigurationUtilsTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/ConfigurationUtilsTests.java @@ -22,9 +22,13 @@ package org.elasticsearch.ingest.processor; import org.elasticsearch.test.ESTestCase; import org.junit.Before; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.equalTo; public class ConfigurationUtilsTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorFactoryTests.java index 369e4d461de..f1b6fce6ced 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorFactoryTests.java @@ -22,7 +22,6 @@ package org.elasticsearch.ingest.processor.convert; import org.elasticsearch.test.ESTestCase; import org.hamcrest.Matchers; -import java.util.Collections; import java.util.HashMap; import java.util.Map; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorTests.java index fe560656ce5..062f72f64bc 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/convert/ConvertProcessorTests.java @@ -24,7 +24,12 @@ import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.ingest.processor.Processor; import org.elasticsearch.test.ESTestCase; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import static org.elasticsearch.ingest.processor.convert.ConvertProcessor.Type; import static org.hamcrest.Matchers.containsString; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorFactoryTests.java index 62f726cf0cd..08b546dead4 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorFactoryTests.java @@ -1,11 +1,11 @@ /* - * Licensed to ElasticSearch and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. ElasticSearch licenses this - * file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -22,7 +22,13 @@ package org.elasticsearch.ingest.processor.date; import org.elasticsearch.test.ESTestCase; import org.joda.time.DateTimeZone; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorTests.java index 86e4017d57c..43724480004 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/date/DateProcessorTests.java @@ -1,11 +1,11 @@ /* - * Licensed to ElasticSearch and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. ElasticSearch licenses this - * file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -25,7 +25,12 @@ import org.elasticsearch.test.ESTestCase; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessorFactoryTests.java index d42f87d8048..9716bcbd3c0 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/geoip/GeoIpProcessorFactoryTests.java @@ -26,11 +26,17 @@ import org.junit.Before; import java.io.ByteArrayInputStream; import java.nio.file.Files; import java.nio.file.Path; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.sameInstance; -import static org.hamcrest.Matchers.startsWith; public class GeoIpProcessorFactoryTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokProcessorTests.java index cb20c5887cd..14164523726 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokProcessorTests.java @@ -23,9 +23,10 @@ import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.test.ESTestCase; -import java.util.*; +import java.util.Collections; +import java.util.HashMap; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.equalTo; public class GrokProcessorTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokTests.java index b73a8e0030b..c253f7dfd84 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/grok/GrokTests.java @@ -24,9 +24,10 @@ import org.junit.Before; import java.io.IOException; import java.io.InputStream; -import java.lang.Object; -import java.lang.String; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorFactoryTests.java index e1e085d135f..bcf00244809 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorFactoryTests.java @@ -21,9 +21,7 @@ package org.elasticsearch.ingest.processor.gsub; import org.elasticsearch.test.ESTestCase; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorTests.java index 8eb5be790ea..f64d271539f 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/gsub/GsubProcessorTests.java @@ -24,10 +24,8 @@ import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.ingest.processor.Processor; import org.elasticsearch.test.ESTestCase; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.regex.Pattern; import static org.hamcrest.Matchers.containsString; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/join/JoinProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/join/JoinProcessorTests.java index df6c835b3c9..6a8acc745ff 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/join/JoinProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/join/JoinProcessorTests.java @@ -24,7 +24,10 @@ import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.ingest.processor.Processor; import org.elasticsearch.test.ESTestCase; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorFactoryTests.java index 34864e38eea..4ca0f1b8f04 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorFactoryTests.java @@ -21,9 +21,7 @@ package org.elasticsearch.ingest.processor.lowercase; import org.elasticsearch.test.ESTestCase; -import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Map; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorTests.java index 6e85b338b1a..8608bb769a0 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/lowercase/LowercaseProcessorTests.java @@ -22,7 +22,6 @@ package org.elasticsearch.ingest.processor.lowercase; import org.elasticsearch.ingest.processor.AbstractStringProcessor; import org.elasticsearch.ingest.processor.AbstractStringProcessorTestCase; -import java.util.Collection; import java.util.Locale; public class LowercaseProcessorTests extends AbstractStringProcessorTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorFactoryTests.java index eba08ad6c46..62c7fb7c9bd 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorFactoryTests.java @@ -21,7 +21,6 @@ package org.elasticsearch.ingest.processor.rename; import org.elasticsearch.test.ESTestCase; -import java.util.Collections; import java.util.HashMap; import java.util.Map; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorTests.java index 3968a2ec73f..8dc40360390 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/rename/RenameProcessorTests.java @@ -24,7 +24,11 @@ import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.ingest.processor.Processor; import org.elasticsearch.test.ESTestCase; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/set/SetProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/set/SetProcessorTests.java index 9d772602f78..dabdeb54f94 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/set/SetProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/set/SetProcessorTests.java @@ -19,12 +19,16 @@ package org.elasticsearch.ingest.processor.set; -import org.elasticsearch.ingest.*; +import org.elasticsearch.ingest.IngestDocument; +import org.elasticsearch.ingest.RandomDocumentPicks; +import org.elasticsearch.ingest.TemplateService; +import org.elasticsearch.ingest.TestTemplateService; +import org.elasticsearch.ingest.ValueSource; import org.elasticsearch.ingest.processor.Processor; import org.elasticsearch.test.ESTestCase; import org.hamcrest.Matchers; -import java.util.*; +import java.util.HashMap; import static org.hamcrest.Matchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorFactoryTests.java index 4d6634b8568..5f144593ee3 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorFactoryTests.java @@ -21,7 +21,6 @@ package org.elasticsearch.ingest.processor.split; import org.elasticsearch.test.ESTestCase; -import java.util.Collections; import java.util.HashMap; import java.util.Map; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorTests.java index 594ba3b4590..945faaf9fb4 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/split/SplitProcessorTests.java @@ -24,7 +24,10 @@ import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.ingest.processor.Processor; import org.elasticsearch.test.ESTestCase; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/trim/TrimProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/trim/TrimProcessorFactoryTests.java index 169ebda0064..d955cec0d0f 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/trim/TrimProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/trim/TrimProcessorFactoryTests.java @@ -21,9 +21,7 @@ package org.elasticsearch.ingest.processor.trim; import org.elasticsearch.test.ESTestCase; -import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Map; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorFactoryTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorFactoryTests.java index a8e048bdcf2..4dd50e2c1e6 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorFactoryTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorFactoryTests.java @@ -21,9 +21,7 @@ package org.elasticsearch.ingest.processor.uppercase; import org.elasticsearch.test.ESTestCase; -import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Map; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorTests.java b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorTests.java index 00e4d1826ca..8327dc9f831 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/ingest/processor/uppercase/UppercaseProcessorTests.java @@ -22,7 +22,6 @@ package org.elasticsearch.ingest.processor.uppercase; import org.elasticsearch.ingest.processor.AbstractStringProcessor; import org.elasticsearch.ingest.processor.AbstractStringProcessorTestCase; -import java.util.Collection; import java.util.Locale; public class UppercaseProcessorTests extends AbstractStringProcessorTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/IngestBootstrapperTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/IngestBootstrapperTests.java index d726d1b294a..be0251726d0 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/IngestBootstrapperTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/IngestBootstrapperTests.java @@ -28,7 +28,12 @@ import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlocks; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; -import org.elasticsearch.cluster.routing.*; +import org.elasticsearch.cluster.routing.IndexRoutingTable; +import org.elasticsearch.cluster.routing.IndexShardRoutingTable; +import org.elasticsearch.cluster.routing.RoutingTable; +import org.elasticsearch.cluster.routing.ShardRoutingState; +import org.elasticsearch.cluster.routing.TestShardRouting; +import org.elasticsearch.cluster.routing.UnassignedInfo; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.text.Text; @@ -49,7 +54,13 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.core.Is.is; import static org.mockito.Matchers.any; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; public class IngestBootstrapperTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineExecutionServiceTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineExecutionServiceTests.java index a1e3191e16c..a1ffa9586d1 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineExecutionServiceTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineExecutionServiceTests.java @@ -35,11 +35,21 @@ import org.mockito.ArgumentMatcher; import org.mockito.Matchers; import org.mockito.invocation.InvocationOnMock; -import java.util.*; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; import static org.hamcrest.Matchers.equalTo; import static org.mockito.Matchers.any; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; public class PipelineExecutionServiceTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineStoreTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineStoreTests.java index 90972ac41c2..84ee9ad0ee9 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineStoreTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/PipelineStoreTests.java @@ -29,7 +29,6 @@ import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.text.Text; -import org.elasticsearch.env.Environment; import org.elasticsearch.index.get.GetResult; import org.elasticsearch.search.internal.InternalSearchHit; import org.elasticsearch.search.internal.InternalSearchHits; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilterTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilterTests.java index cc32634c9a0..e55393edd31 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilterTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/IngestActionFilterTests.java @@ -33,10 +33,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.ingest.IngestDocument; import org.elasticsearch.ingest.Pipeline; import org.elasticsearch.ingest.processor.Processor; +import org.elasticsearch.plugin.ingest.IngestBootstrapper; import org.elasticsearch.plugin.ingest.IngestPlugin; import org.elasticsearch.plugin.ingest.PipelineExecutionService; import org.elasticsearch.plugin.ingest.PipelineStore; -import org.elasticsearch.plugin.ingest.IngestBootstrapper; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.junit.Before; @@ -47,11 +47,18 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import static org.elasticsearch.plugin.ingest.transport.IngestActionFilter.*; -import static org.hamcrest.Matchers.*; +import static org.elasticsearch.plugin.ingest.transport.IngestActionFilter.BulkRequestModifier; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.nullValue; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; public class IngestActionFilterTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesActionTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesActionTests.java index 32467cfe555..d6f2d3f3d9f 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesActionTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/reload/ReloadPipelinesActionTests.java @@ -38,11 +38,11 @@ import java.util.Collections; import java.util.Map; import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; -import static org.hamcrest.CoreMatchers.is; import static org.mockito.Mockito.when; public class ReloadPipelinesActionTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulateExecutionServiceTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulateExecutionServiceTests.java index 973e8c1d8e1..a60b8945f10 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulateExecutionServiceTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulateExecutionServiceTests.java @@ -31,8 +31,16 @@ import org.junit.Before; import java.util.Arrays; -import static org.hamcrest.Matchers.*; -import static org.mockito.Mockito.*; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.nullValue; +import static org.hamcrest.Matchers.sameInstance; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; public class SimulateExecutionServiceTests extends ESTestCase { diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineRequestParsingTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineRequestParsingTests.java index 9484a621d58..4bff810a9c2 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineRequestParsingTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineRequestParsingTests.java @@ -27,9 +27,16 @@ import org.elasticsearch.test.ESTestCase; import org.junit.Before; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; -import static org.elasticsearch.ingest.IngestDocument.MetaData.*; +import static org.elasticsearch.ingest.IngestDocument.MetaData.ID; +import static org.elasticsearch.ingest.IngestDocument.MetaData.INDEX; +import static org.elasticsearch.ingest.IngestDocument.MetaData.TYPE; import static org.elasticsearch.plugin.ingest.transport.simulate.SimulatePipelineRequest.Fields; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; diff --git a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineResponseTests.java b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineResponseTests.java index 1b3b35e2154..47dd12dc75c 100644 --- a/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineResponseTests.java +++ b/plugins/ingest/src/test/java/org/elasticsearch/plugin/ingest/transport/simulate/SimulatePipelineResponseTests.java @@ -30,7 +30,9 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.nullValue; public class SimulatePipelineResponseTests extends ESTestCase {