From 6557f10a81c6c95eed0be9eead84f026bcf6e958 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Wed, 10 Apr 2024 23:51:16 +0200 Subject: Collections.emptyXXX + Collections.singletonXXX => List/Set/Map.of --- .../RankingExpressionWithTransformerTokensTestCase.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithTransformerTokensTestCase.java') diff --git a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithTransformerTokensTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithTransformerTokensTestCase.java index 9213f97fd9f..6cbd8faf3b0 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithTransformerTokensTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithTransformerTokensTestCase.java @@ -19,7 +19,7 @@ import com.yahoo.searchlib.rankingexpression.evaluation.TensorValue; import com.yahoo.tensor.Tensor; import org.junit.jupiter.api.Test; -import java.util.Collections; +import java.util.Map; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -94,16 +94,17 @@ public class RankingExpressionWithTransformerTokensTestCase { MockApplicationPackage application = (MockApplicationPackage) MockApplicationPackage.createEmpty(); RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); QueryProfileRegistry queryProfileRegistry = application.getQueryProfiles(); - String sdContent = "search test {\n" + - " document test {}\n" + - " rank-profile my_profile inherits default {}\n" + - "}"; + String sdContent = """ + search test { + document test {} + rank-profile my_profile inherits default {} + }"""; ApplicationBuilder schemaBuilder = new ApplicationBuilder(application, new MockFileRegistry(), new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry); schemaBuilder.addSchema(sdContent); schemaBuilder.build(true); Schema schema = schemaBuilder.getSchema(); RankProfile rp = rankProfileRegistry.get(schema, "my_profile"); - return new RankProfileTransformContext(rp, queryProfileRegistry, Collections.emptyMap(), null, Collections.emptyMap(), Collections.emptyMap()); + return new RankProfileTransformContext(rp, queryProfileRegistry, Map.of(), null, Map.of(), Map.of()); } } -- cgit v1.2.3