diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-04-10 15:33:21 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-04-10 15:33:21 +0200 |
commit | 6a531772452cb18af55e7e1ecb42dad3c23ad5d8 (patch) | |
tree | 624434a25322ec440eb5af4a9307ded3af1b88a1 | |
parent | 0f0340ad6102ca52f0054c01e8aee74d31e9de0c (diff) |
Drop improved error message for single value struct field.
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/document/Attribute.java | 3 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java | 5 |
2 files changed, 0 insertions, 8 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Attribute.java b/config-model/src/main/java/com/yahoo/schema/document/Attribute.java index 6198c54d258..ac936ee989e 100644 --- a/config-model/src/main/java/com/yahoo/schema/document/Attribute.java +++ b/config-model/src/main/java/com/yahoo/schema/document/Attribute.java @@ -279,9 +279,6 @@ public final class Attribute implements Cloneable, Serializable { if (fieldType instanceof ArrayDataType arrayType && arrayType.getNestedType() instanceof StructDataType nestedType) { failDataType(schemaName, fieldName, "array<" + nestedType.getName() + ">"); } - if (fieldType instanceof StructDataType structType) { - failDataType(schemaName, fieldName, structType.getName()); - } } /** Converts to the right attribute type from a field datatype */ diff --git a/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java index 4167c9b3d4b..f21999df94c 100644 --- a/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/derived/AttributeListTestCase.java @@ -137,11 +137,6 @@ public class AttributeListTestCase extends AbstractSchemaTestCase { run_bad_struct_or_map_attribute("array<s>"); } - @Test - void bad_struct_attribute() throws ParseException { - run_bad_struct_or_map_attribute("s"); - } - private void run_bad_struct_or_map_attribute(String type) throws ParseException { run_bad_struct_or_map_attribute(type, false, true); run_bad_struct_or_map_attribute(type, true, false); |