Skip to content

Commit fe55b6d

Browse files
committed
fix(java): guard a missing @agg before the value-object aggregate check
List.of(...).contains(null) throws, so an origin.aggregate with no @agg over a resolvable @Of crashed the loader instead of reporting the missing attribute.
1 parent 14da8cd commit fe55b6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎server/java/metadata/src/main/java/com/metaobjects/loader/ValidationPhase.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3119,7 +3119,7 @@ private static void validateOriginNode(MetaRoot root, MetaObject obj,
31193119
// Money-shaped value would add amounts in different currencies.
31203120
// ADR-0039: resolving (hasMetaAttr defaults to includeParentData) — @objectRef may be
31213121
// inherited via extends.
3122-
if (MetaOrigin.COLUMN_VALUE_AGGREGATES.contains(agg)
3122+
if (agg != null && MetaOrigin.COLUMN_VALUE_AGGREGATES.contains(agg)
31233123
&& (ObjectField.SUBTYPE_OBJECT.equals(ofTarget.field.getSubType())
31243124
|| ofTarget.field.hasMetaAttr(ObjectField.ATTR_OBJECTREF))) {
31253125
throw new MetaDataException(

0 commit comments

Comments
 (0)