Skip to content

Commit 102ff14

Browse files
dmealingclaude
andcommitted
docs(java): refresh stale comments to include source + identity in auto-naming list
Three inline comments still listed 'validator and view' as the auto-naming set after Task 5 + the auto-naming bug fix expanded the set to also include 'source' and 'identity'. One was added in this unit; two were carryover from Unit 1. Minor finding from the final reviewer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 318840d commit 102ff14

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

server/java/metadata/src/main/java/com/metaobjects/io/json/CanonicalJsonSerializer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ private static boolean getNativeIsArray(MetaData node) {
424424
*/
425425
private static boolean isAutoGeneratedName(MetaData node) {
426426
String typeName = node.getType();
427-
// Only validator and view types use auto-naming — delegate to the single source of truth.
427+
// Only the types in isAutoNamingType (validator, view, source, identity) use
428+
// auto-naming — delegate to the single source of truth.
428429
if (!BaseMetaDataParser.isAutoNamingType(typeName)) {
429430
return false;
430431
}

server/java/metadata/src/main/java/com/metaobjects/loader/parser/BaseMetaDataParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ protected MetaData createOrOverlayMetaData( boolean isRoot,
269269
+ "] requires a name to be specified in file [" + getFilename() + "]");
270270
}
271271

272-
// Auto-naming only allowed for validator and view types (and not abstract at root)
272+
// Auto-naming only allowed for the types in isAutoNamingType (validator, view,
273+
// source, identity) and not abstract at root.
273274
if (isAutoNamingType(typeName) &&
274275
!(isRoot && Boolean.TRUE.equals(isAbstract))) {
275276
// Generate sequential name based on subtype if available, otherwise use type

server/java/metadata/src/main/java/com/metaobjects/loader/parser/json/CanonicalJsonParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ private void processNode(MetaData parent, String type, String subType,
367367
// type that follows the subType-as-name convention. Registry-driven: no
368368
// per-type hardcoding.
369369
//
370-
// EXCEPTION: types that participate in auto-naming (validator, view, source)
370+
// EXCEPTION: types that participate in auto-naming (validator, view, source, identity)
371371
// skip this fallback. They receive a sequential auto-name from
372372
// createOrOverlayMetaData (rdb1, rdb2, …) and the serializer's
373373
// isAutoGeneratedName check suppresses emission of that auto-name on the way

0 commit comments

Comments
 (0)