Commit 03576e5
refactor(metadata): tighten WA2 commonAttrs additions — name the universal-tier key, drop ATTR_PREFIX alias, sharpen comments
Behavior-preserving simplifications across the WA2 commonAttrs surface:
- MetaDataRegistry: extract UNIVERSAL_PARENT_KEY constant for the "*.*"
globalRequirements tier (named over magic string; 3 usages).
- MetaDataRegistry.isArrayShapedValue: switch to pattern-matching instanceof
(Java 21) and add Javadoc clarifying that the empty-string branch handles
the desugar-invariant case (post-`[]` token), not author input.
- CanonicalJsonParser: drop the private @deprecated ATTR_PREFIX alias and
use JSON_ATTR_PREFIX directly at its 3 sites; the alias was internal-only
so no external consumer is affected (only the public JSON_ATTR_PREFIX is
referenced from codegen-base).
- BaseMetaDataParser: add a real import for CommonAttributeDef to drop the
fully-qualified reference in the lookup body.
- ConformanceTest: add a "maintenance caveat" comment on PROVIDER_ALIASES
per code-review feedback — if any of the 8 backing Java provider ids is
renamed or removed, the cross-language alias silently disappears.
Tests: metadata 608/0/0, ConformanceTest 168/0/0. Downstream codegen-base
compiles unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 83d0b62 commit 03576e5
4 files changed
Lines changed: 34 additions & 18 deletions
File tree
- server/java/metadata/src
- main/java/com/metaobjects
- loader/parser
- json
- registry
- test/java/com/metaobjects/conformance
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
864 | 865 | | |
865 | 866 | | |
866 | 867 | | |
867 | | - | |
868 | | - | |
| 868 | + | |
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
| |||
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
| |||
546 | 542 | | |
547 | 543 | | |
548 | 544 | | |
549 | | - | |
| 545 | + | |
550 | 546 | | |
551 | 547 | | |
552 | 548 | | |
| |||
555 | 551 | | |
556 | 552 | | |
557 | 553 | | |
558 | | - | |
| 554 | + | |
559 | 555 | | |
560 | 556 | | |
561 | 557 | | |
| |||
564 | 560 | | |
565 | 561 | | |
566 | 562 | | |
567 | | - | |
| 563 | + | |
568 | 564 | | |
569 | 565 | | |
570 | 566 | | |
| |||
Lines changed: 22 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
| |||
355 | 363 | | |
356 | 364 | | |
357 | 365 | | |
358 | | - | |
359 | | - | |
| 366 | + | |
| 367 | + | |
360 | 368 | | |
361 | 369 | | |
362 | 370 | | |
| |||
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
401 | | - | |
402 | | - | |
| 409 | + | |
| 410 | + | |
403 | 411 | | |
404 | 412 | | |
405 | 413 | | |
| |||
493 | 501 | | |
494 | 502 | | |
495 | 503 | | |
496 | | - | |
497 | | - | |
| 504 | + | |
| 505 | + | |
498 | 506 | | |
499 | 507 | | |
500 | 508 | | |
| |||
554 | 562 | | |
555 | 563 | | |
556 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
557 | 571 | | |
558 | 572 | | |
559 | 573 | | |
560 | 574 | | |
561 | | - | |
562 | | - | |
| 575 | + | |
563 | 576 | | |
564 | | - | |
| 577 | + | |
565 | 578 | | |
566 | 579 | | |
567 | 580 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| |||
0 commit comments