aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/main/java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-04-11 10:27:59 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2024-04-11 16:07:22 +0200
commit48b9513ee685145d338e0cf9970193ba8254ce33 (patch)
treed9f489b0c1ffd448bc067441b032adfb1c379f1b /document/src/main/java
parentef1cf91e0d21ceb4c40d1a6efd62d3dabd08cb86 (diff)
Unify on Set.of
Diffstat (limited to 'document/src/main/java')
-rw-r--r--document/src/main/java/com/yahoo/document/DocumentType.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/document/src/main/java/com/yahoo/document/DocumentType.java b/document/src/main/java/com/yahoo/document/DocumentType.java
index 38bd3bfdeca..3b58b50dc4f 100644
--- a/document/src/main/java/com/yahoo/document/DocumentType.java
+++ b/document/src/main/java/com/yahoo/document/DocumentType.java
@@ -62,13 +62,13 @@ public class DocumentType extends StructuredDataType {
* @param contentStructType The type of the content struct
*/
public DocumentType(String name, StructDataType contentStructType) {
- this(name, contentStructType, Collections.emptySet());
+ this(name, contentStructType, Set.of());
}
public DocumentType(String name, StructDataType contentStructType, Set<String> importedFieldNames) {
super(name);
this.contentStructType = contentStructType;
- this.importedFieldNames = Collections.unmodifiableSet(importedFieldNames);
+ this.importedFieldNames = Set.copyOf(importedFieldNames);
}
public DocumentType(String name, Set<String> importedFieldNames) {