codeconsole commented on PR #15195: URL: https://github.com/apache/grails-core/pull/15195#issuecomment-3476924181
@matrei if you recall, we did this `this.resource = resource.getDeclaredConstructor().newInstance() as GormAllOperations<T>` so we could `@CompileStatic` but I think it is best to keep resource a `Class<T>` for 2 reasons: 1. Simplify the DomainServiceLocator lookup 2. Keep in line with https://github.com/apache/grails-core/blob/7f9a2c0fbc8bc27e23a53d39514bc648f54133e7/grails-rest-transforms/src/main/groovy/grails/rest/RestfulController.groovy#L46-L47 Also, I found it unnecessary to instantiate an instance if we separate `GormAllOperations<T>` and `Class<T>` -- 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]
