aboutsummaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-06-02 10:30:46 +0000
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:24 +0200
commit9e330c98d573866f162ef76207a8699d76d634c4 (patch)
tree4b01c156d87bff70c50771b7e0b3b7a1997250bc /document
parentbab6cee587fc7605c86a146467c307b0fe2cda83 (diff)
remove TemporaryDataType
Diffstat (limited to 'document')
-rw-r--r--document/src/main/java/com/yahoo/document/DocumentTypeManager.java15
-rw-r--r--document/src/main/java/com/yahoo/document/TemporaryDataType.java37
-rw-r--r--document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java25
3 files changed, 0 insertions, 77 deletions
diff --git a/document/src/main/java/com/yahoo/document/DocumentTypeManager.java b/document/src/main/java/com/yahoo/document/DocumentTypeManager.java
index af7c267c8c4..42bc27e485b 100644
--- a/document/src/main/java/com/yahoo/document/DocumentTypeManager.java
+++ b/document/src/main/java/com/yahoo/document/DocumentTypeManager.java
@@ -219,18 +219,6 @@ public class DocumentTypeManager {
}
/**
- * @deprecated //TODO Will be package-private or removed on Vespa 8
- */
- @SuppressWarnings("deprecation")
- @Deprecated
- DataType getDataTypeAndReturnTemporary(int code, String detailedType) {
- if (hasDataType(code)) {
- return getDataType(code, detailedType);
- }
- return new TemporaryDataType(code, detailedType);
- }
-
- /**
* Register a data type of any sort, including document types.
* @param type The datatype to register
* TODO Give unique ids to document types
@@ -247,9 +235,6 @@ public class DocumentTypeManager {
@SuppressWarnings("deprecation")
void registerSingleType(DataType type) {
if (type instanceof TensorDataType) return; // built-in dynamic: Created on the fly
- if (type instanceof TemporaryDataType) {
- throw new IllegalArgumentException("TemporaryDataType no longer supported: " + type);
- }
if (type instanceof TemporaryStructuredDataType) {
throw new IllegalArgumentException("TemporaryStructuredDataType no longer supported: " + type);
}
diff --git a/document/src/main/java/com/yahoo/document/TemporaryDataType.java b/document/src/main/java/com/yahoo/document/TemporaryDataType.java
deleted file mode 100644
index 71f36ecde90..00000000000
--- a/document/src/main/java/com/yahoo/document/TemporaryDataType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.document;
-
-import com.yahoo.document.datatypes.FieldValue;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated will be removed soon
- */
-@Deprecated
-class TemporaryDataType extends DataType {
-
- private final String detailedType;
-
- TemporaryDataType(int dataTypeId, String detailedType) {
- super("temporary_" + dataTypeId, dataTypeId);
- this.detailedType = detailedType;
- }
-
- @Override
- public FieldValue createFieldValue() {
- return null;
- }
-
- @Override
- public Class getValueClass() {
- return null;
- }
-
- @Override
- public boolean isValueCompatible(FieldValue value) {
- return false;
- }
-
- String getDetailedType() { return detailedType; }
-
-}
diff --git a/document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java b/document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java
deleted file mode 100644
index 80154891d83..00000000000
--- a/document/src/test/java/com/yahoo/document/TemporaryDataTypeTestCase.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.document;
-
-import com.yahoo.document.datatypes.StringFieldValue;
-import org.junit.Test;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-
-/**
- * @author Einar M R Rosenvinge
- */
-@SuppressWarnings("deprecation")
-public class TemporaryDataTypeTestCase {
-
- @Test
- public void requireNulls() {
- TemporaryDataType type = new TemporaryDataType(0, "");
- assertNull(type.createFieldValue(new Object()));
- assertNull(type.createFieldValue());
- assertNull(type.getValueClass());
- assertFalse(type.isValueCompatible(new StringFieldValue("")));
- }
-
-}