borinquenkid opened a new pull request, #16662:
URL: https://github.com/apache/grails-core/pull/16662

   Stacks on #16577 (java-to-groovy conversion for `grails-async/core`, 
`grails-beans-dsl`, `grails-common`).
   
   Idiomatic-Groovy pass over that conversion's output. No behavior or public 
API change.
   
   **Applied**
   - Null-safe navigation / Elvis for null checks 
(`AutoConfigurationImportsWriter`, `OnGrailsEnvCondition`)
   - Groovy truth for non-falsy object types
   - `in` for `Collection.contains`
   - `==`/`!=` for `String.equals()`
   - Property syntax for unambiguous getters (`OnGrailsEnvCondition`, 
`RegistrableTypes`'s ASM accessors)
   - Flow typing instead of `instanceof` + explicit cast (locals only)
   - Trailing-closure `removeIf`/`computeIfAbsent`, `findAll` instead of a 
build-only for-loop, null-safe `.each`
   - `.every` instead of an early-exit-failure for-loop (all-match shape)
   - GString instead of String+Object concatenation landing in a `String`-typed 
slot
   - `'.' as char` instead of `'.'.charAt(0)`
   - `Arrays.asList(array)` → `array.toList()`
   
   **Deliberately left**: every `ClassNode`/AST-node `.equals()`/identity 
comparison in `DelegateAsyncTransformation` and `GrailsBeansASTTransformation` 
— these compare AST nodes or possibly-mismatched-type values where `==` risks 
changing identity semantics or throwing via a `Comparable`/`compareTo` path 
`.equals()` doesn't. `GrailsBeansASTTransformation.groovy` (3,514 lines) left 
untouched in its entirety for the same reason — flagged as a Tier-C skip rather 
than cherry-picked.
   
   **Verification**
   - `grails-async-core` (96/0), `grails-beans-dsl` (449/0), `grails-common` 
(68/0) — all green, 0 CodeNarc violations
   - `javap -c -p` dynamic-dispatch audit clean on every changed class
   - Downstream `compileGroovy` green across 13 consuming modules (async 
variants, databinding-core, web-databinding, views-gson/core, 
data-mongodb-core, domain-class, etc.)
   
   This revision also carries forward and resolves the rename-compliance fix 
from #16576/#16661 (`DefaultCommandLine.groovy`), inherited cleanly via the 
chain merge.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to