Skip to content

Commit 7c3188f

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent ec18620 commit 7c3188f

File tree

7 files changed

+26
-10
lines changed

7 files changed

+26
-10
lines changed

server/src/main/java/org/elasticsearch/action/ActionListener.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.elasticsearch.core.Releasable;
2222
import org.elasticsearch.transport.LeakTracker;
2323

24-
import java.io.IOException;
2524
import java.util.ArrayList;
2625
import java.util.List;
2726
import java.util.concurrent.atomic.AtomicReference;

server/src/main/java/org/elasticsearch/action/datastreams/GetDataStreamAction.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,11 @@ public XContentBuilder toXContent(
431431
dataStream.getSettings().toXContent(builder, params);
432432
builder.endObject();
433433

434-
Map<String, Object> uncompressedMapping = XContentHelper.convertToMap(dataStream.getMappings().uncompressed(), true, XContentType.JSON)
435-
.v2();
434+
Map<String, Object> uncompressedMapping = XContentHelper.convertToMap(
435+
dataStream.getMappings().uncompressed(),
436+
true,
437+
XContentType.JSON
438+
).v2();
436439
if (uncompressedMapping.isEmpty() == false) {
437440
builder.field(MAPPINGS_FIELD.getPreferredName());
438441
builder.map(uncompressedMapping);

server/src/main/java/org/elasticsearch/cluster/metadata/ComposableIndexTemplate.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,11 @@ private CompressedXContent merge(CompressedXContent originalMapping, CompressedX
369369
Map<String, Object> mappingAdditionMap = XContentHelper.convertToMap(mappingAddition.uncompressed(), true, XContentType.JSON).v2();
370370
Map<String, Object> combinedMappingMap = new HashMap<>();
371371
if (originalMapping != null) {
372-
combinedMappingMap.putAll((Map<? extends String, ?>) XContentHelper.convertToMap(originalMapping.uncompressed(), true, XContentType.JSON).v2().get("_doc"));
372+
combinedMappingMap.putAll(
373+
(Map<? extends String, ?>) XContentHelper.convertToMap(originalMapping.uncompressed(), true, XContentType.JSON)
374+
.v2()
375+
.get("_doc")
376+
);
373377
}
374378
XContentHelper.update(combinedMappingMap, mappingAdditionMap, true);
375379
if (combinedMappingMap.isEmpty()) {

server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import org.elasticsearch.index.IndexMode;
4747
import org.elasticsearch.index.IndexSettings;
4848
import org.elasticsearch.index.mapper.DateFieldMapper;
49-
import org.elasticsearch.index.mapper.MapperService;
5049
import org.elasticsearch.index.mapper.Mapping;
5150
import org.elasticsearch.indices.SystemIndices;
5251
import org.elasticsearch.xcontent.ConstructingObjectParser;

server/src/main/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsService.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,14 @@ public void updateSettings(
464464
);
465465
}
466466

467-
public void updateMappings(ProjectId projectId, TimeValue masterNodeTimeout, TimeValue ackTimeout, String dataStreamName,
468-
CompressedXContent mappingsOverrides, ActionListener<AcknowledgedResponse> listener) {
467+
public void updateMappings(
468+
ProjectId projectId,
469+
TimeValue masterNodeTimeout,
470+
TimeValue ackTimeout,
471+
String dataStreamName,
472+
CompressedXContent mappingsOverrides,
473+
ActionListener<AcknowledgedResponse> listener
474+
) {
469475
updateMappingsTaskQueue.submitTask(
470476
"updating mappings on data stream",
471477
new UpdateMappingsTask(projectId, dataStreamName, mappingsOverrides, ackTimeout, listener),

server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2690,7 +2690,13 @@ protected ToXContent.Params getToXContentParams() {
26902690
if (randomBoolean()) {
26912691
return ToXContent.EMPTY_PARAMS;
26922692
}
2693-
return new ToXContent.MapParams(Map.of("binary", randomFrom("true", "false"), Metadata.CONTEXT_MODE_PARAM,
2694-
randomFrom(Metadata.XContentContext.values()).toString()));
2693+
return new ToXContent.MapParams(
2694+
Map.of(
2695+
"binary",
2696+
randomFrom("true", "false"),
2697+
Metadata.CONTEXT_MODE_PARAM,
2698+
randomFrom(Metadata.XContentContext.values()).toString()
2699+
)
2700+
);
26952701
}
26962702
}

test/framework/src/main/java/org/elasticsearch/cluster/metadata/DataStreamTestHelper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import org.elasticsearch.test.ESTestCase;
5656
import org.elasticsearch.threadpool.ThreadPool;
5757
import org.elasticsearch.xcontent.NamedXContentRegistry;
58-
import org.elasticsearch.xcontent.ToXContent;
5958
import org.hamcrest.Description;
6059
import org.hamcrest.Matcher;
6160
import org.hamcrest.TypeSafeMatcher;

0 commit comments

Comments
 (0)