aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/documentmodel
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-04-10 23:51:16 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2024-04-10 23:51:16 +0200
commit6557f10a81c6c95eed0be9eead84f026bcf6e958 (patch)
treee128c68aaa732f58359434e356de230af13282e6 /config-model/src/main/java/com/yahoo/documentmodel
parent05c4d137d13f4485c9fce9f712b0389d2f70f044 (diff)
Collections.emptyXXX + Collections.singletonXXX => List/Set/Map.of
Diffstat (limited to 'config-model/src/main/java/com/yahoo/documentmodel')
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
index 77e123fefef..c5140dd6fc8 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
@@ -25,7 +25,6 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
-import static java.util.Collections.emptySet;
/**
* @author baldersheim
@@ -47,7 +46,7 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
private final Set<String> importedFieldNames;
public NewDocumentType(Name name) {
- this(name, emptySet());
+ this(name, Set.of());
}
public NewDocumentType(Name name, Set<Name> documentReferences, Set<String> importedFieldNames) {
@@ -60,7 +59,7 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
}
public NewDocumentType(Name name, Set<Name> documentReferences) {
- this(name, documentReferences, emptySet());
+ this(name, documentReferences, Set.of());
}
public NewDocumentType(Name name,
@@ -74,8 +73,8 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
if (fs != null) {
this.fieldSets.addAll(fs.userFieldSets().values());
for (FieldSet f : fs.builtInFieldSets().values()) {
- if ((f.getName() != BuiltInFieldSets.INTERNAL_FIELDSET_NAME) &&
- (f.getName() != BuiltInFieldSets.SEARCH_FIELDSET_NAME)) {
+ if (!BuiltInFieldSets.INTERNAL_FIELDSET_NAME.equals(f.getName()) &&
+ !BuiltInFieldSets.SEARCH_FIELDSET_NAME.equals(f.getName())) {
fieldSets.add(f);
}
}