diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-06-17 06:52:03 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-06-17 06:57:45 +0000 |
commit | 2f87b5f065f79dc742f7221234b0081600aa97f1 (patch) | |
tree | 4f7ea3e469f3517b011e31d7e3c1ffb313a6419e /config-model/src/main/java/com/yahoo/schema/document | |
parent | a90639a4c194cbf486d20eba8969340a4ce461ad (diff) |
remove TemporarySDDocumentType
* track converted structs as we make them
* inherit directly instead of by name
* remove code to deal with the no-longer-needed temporaries
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/document')
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java | 7 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/document/TemporarySDDocumentType.java | 13 |
2 files changed, 1 insertions, 19 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java b/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java index d19b62ce555..919a6023151 100644 --- a/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java +++ b/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java @@ -167,16 +167,11 @@ public class SDDocumentType implements Cloneable { public DataTypeName getDocumentName() { return docType.getDataTypeName(); } public DocumentType getDocumentType() { return docType; } - public void inherit(DataTypeName name) { - inherit(new TemporarySDDocumentType(name)); - } - public void inherit(SDDocumentType type) { if (type == null) return; if (type.getName().equals(this.getName())) throw new IllegalArgumentException("Document type '" + getName() + "' cannot inherit itself"); - if ( ! inheritedTypes.containsKey(type.getDocumentName()) || - (inheritedTypes.get(type.getDocumentName()) instanceof TemporarySDDocumentType)) { + if (! inheritedTypes.containsKey(type.getDocumentName())) { inheritedTypes.put(type.getDocumentName(), type); } } diff --git a/config-model/src/main/java/com/yahoo/schema/document/TemporarySDDocumentType.java b/config-model/src/main/java/com/yahoo/schema/document/TemporarySDDocumentType.java deleted file mode 100644 index 3194a14a143..00000000000 --- a/config-model/src/main/java/com/yahoo/schema/document/TemporarySDDocumentType.java +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.schema.document; - -import com.yahoo.document.DataTypeName; - -/** - * @author baldersheim - */ -public class TemporarySDDocumentType extends SDDocumentType { - public TemporarySDDocumentType(DataTypeName name) { - super(name); - } -} |