summaryrefslogtreecommitdiffstats
path: root/docprocs/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-04-11 15:09:55 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2024-04-11 21:04:22 +0200
commit2d6bbe0b8bff09d105b77161c1d26a00ce43bf0c (patch)
treef9948a9904d837960887e81a956b29f92d918002 /docprocs/src
parent6923743ed320ce339727ad57f6fc2da5f82f5e3f (diff)
Unify on List.of
Diffstat (limited to 'docprocs/src')
-rw-r--r--docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java b/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java
index 2f07958e39e..7abfdc324b3 100644
--- a/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java
+++ b/docprocs/src/test/java/com/yahoo/docprocs/indexing/DocumentScriptTestCase.java
@@ -21,7 +21,6 @@ import com.yahoo.document.fieldpathupdate.AssignFieldPathUpdate;
import com.yahoo.document.fieldpathupdate.FieldPathUpdate;
import com.yahoo.document.update.AssignValueUpdate;
import com.yahoo.document.update.FieldUpdate;
-import com.yahoo.document.update.MapValueUpdate;
import com.yahoo.document.update.ValueUpdate;
import com.yahoo.vespa.indexinglanguage.AdapterFactory;
import com.yahoo.vespa.indexinglanguage.SimpleAdapterFactory;
@@ -33,8 +32,7 @@ import com.yahoo.vespa.indexinglanguage.parser.ParseException;
import org.junit.Test;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
+import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -160,7 +158,7 @@ public class DocumentScriptTestCase {
assertSpanTrees(str, "mySpanTree");
}
- private class FieldPathFixture {
+ private static class FieldPathFixture {
final DocumentType type;
final StructDataType structType;
final DataType structMap;
@@ -264,7 +262,7 @@ public class DocumentScriptTestCase {
}
private static DocumentScript newScript(DocumentType docType, String fieldName) {
- return new DocumentScript(docType.getName(), Collections.singletonList(fieldName),
+ return new DocumentScript(docType.getName(), List.of(fieldName),
new StatementExpression(new InputExpression(fieldName),
new IndexExpression(fieldName)));
}
@@ -285,7 +283,7 @@ public class DocumentScriptTestCase {
private static void assertSpanTrees(FieldValue actual, String... expectedSpanTrees) {
assertTrue(actual instanceof StringFieldValue);
StringFieldValue str = (StringFieldValue)actual;
- assertEquals(new ArrayList<>(Arrays.asList(expectedSpanTrees)),
+ assertEquals(List.of(expectedSpanTrees),
new ArrayList<>(str.getSpanTreeMap().keySet()));
}
@@ -359,7 +357,7 @@ public class DocumentScriptTestCase {
}
private static DocumentScript newScript() throws ParseException {
- return new DocumentScript("documentType", Arrays.asList("documentField"),
+ return new DocumentScript("documentType", List.of("documentField"),
Expression.fromString("input documentField | index documentField"));
}
}