borinquenkid opened a new pull request, #16580: URL: https://github.com/apache/grails-core/pull/16580
## What Converts the remaining Java sources of `grails-datastore-core` to Groovy: 207 `.java` files removed, 250 `.groovy` files added (310 files changed, 25594 insertions(+), 15494 deletions(-)). ## Why The maintainers asked on #16351 for the Java-to-Groovy migration to land one Gradle project at a time as a stack of PRs, bottom-up in dependency order. #16572 did `grails-data-hibernate7`; this PR is 5 of 30 in the next stack (base: `refactor/java-to-groovy-grails-databinding-core`). The end state of every file is taken from the `9.0.x-java-to-groovy` branch, which already carries the regression fixes found by CI. Commits: - fa765f1f07 refactor: convert grails-datastore-core to Groovy ## Changed outside the converted sources - `A grails-datastore-core/src/test/resources/META-INF/services/org.grails.datastore.mapping.services.SslService` ## Java-facing API sweep Every deleted `.java` was compared with its Groovy twin via `javap -v -protected` (class declaration, public/protected fields, constructors, methods incl. modifiers/throws/generics, interface default methods, nested class modifiers, and the annotations callers see). Result: - `grails-datastore-core`: 207 deleted .java, 1 differences requiring action See also the notes below. Remaining informational entries (widened visibility, e.g. Groovy property accessors): 25. ## Verification - `classes` and `testClasses` (plus `ast`/`cli`/`testFixtures` source sets where present) of the converted project(s) and of their direct dependents compile: ['grails-converters', 'grails-core', 'grails-data-mongodb-bson', 'grails-data-mongodb-core', 'grails-data-simple', 'grails-datamapping-core', 'grails-datamapping-core-test', 'grails-datamapping-rx', 'grails-datamapping-support', 'grails-datamapping-tck', 'grails-datamapping-validation', 'grails-datasource', 'grails-datastore-web', 'grails-domain-class', 'grails-events-rxjava', 'grails-events-transforms', 'grails-spring-security', 'grails-testing-support-datamapping', 'grails-testing-support-views-gson', 'grails-views-core'] - No test suites were run locally (the umbrella branch was verified; CI runs them). `codeStyle`, `rat` and a whole-repo `build -PskipTests` are run once on the tip of the stack. ## Notes - Informational sweep entries that are not regressions: Groovy enums gain `MIN_VALUE`/`MAX_VALUE`/`next()`/`previous()`, property accessors appear for formerly package-private members, nested static classes with implicit constructors become public (they were `protected`), and generic type parameters that Groovy erases in constructors/methods (descriptors identical). - Groovy gotchas that applied (see #16351): `static final` without `public` creates a property; `==` calls `equals()`; Closure/SAM coercions; `@CompileStatic` with nested classes. All CI regression fixes found on the umbrella branch are included in the end state. - Not matchable in Groovy: `ServiceDefinition.orElseThrow` was `<X extends Throwable> T orElseThrow(Supplier<? extends X>) throws X`; Groovy cannot express a type-variable `throws` clause and emits `throws Throwable`. Only Groovy code in this repository calls it (SoftServiceLoader, AbstractDatastoreInitializer); external Java callers would have to handle `Throwable`. 🤖 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]
