eatmoreduck commented on PR #7270:
URL: https://github.com/apache/incubator-kie/pull/7270#issuecomment-6684235701

   Thank you both for the review — restructured exactly along those lines in 
5bbfa486:
   
   - `POJOGenerator.processTypeMetadata()` now consults 
`AnnotationDescr.getFullyQualifiedName()`: a resolved built-in FQN is 
registered under its canonical name (`role`, `expires`, `classReactive`, ...), 
anything else keeps `ann.getName()` as before, so custom metadata keys don't 
change.
   - The case-insensitive mapping in 
`TypeDeclarationUtil.canonicalAnnotationName()` is gone; the file is back to 
its previous exact-name match.
   
   Two new tests in `AlignAnnotationTest`:
   
   - `testCapitalizedClassReactiveOnPlainClass` — `@ClassReactive` (no import) 
on a plain class means the built-in: property reactivity off, red on main like 
the other capitalized cases.
   - `testImportedAnnotationWithCollidingSimpleNameStaysCustom` — imports a 
custom annotation whose simple name is also `ClassReactive`; asserts property 
reactivity keeps its default and the annotation stays as custom metadata under 
its own name. I verified this one fails with the previous consumer-side 
approach (which is what the review flagged), and passes both on main's behavior 
for customs and with the new codegen-time resolution.
   
   One note on that second test: STANDARD_FROM_DRL does not populate a 
`ClassDefinition` metadata map for custom annotations on an existing class 
(pre-existing, unchanged by this PR — my POJOGenerator change leaves 
non-built-ins byte-identical), so the metadata part is asserted on PATTERN_DSL 
only; the property-reactivity part is asserted in both run types.
   
   Local runs (Maven 3.9.16, Java 21): `AlignAnnotationTest` 40 tests / 0 
failures (1 assumption-skipped as above), and the full `drools-model-compiler` 
reactor build is green.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to