bito-code-review[bot] commented on PR #16093: URL: https://github.com/apache/grails-core/pull/16093#issuecomment-5889548116
<!-- Bito Reply --> The removal of the explicit cast `(TestController)` in the test code is likely intended to allow `mockController` to return a more generic or dynamically typed object, or to rely on Groovy's dynamic dispatch. If the method signature of `mockController` has been updated to return a more specific type or if the surrounding code now handles the return type differently, removing the cast avoids potential `ClassCastException` errors or compilation issues if the returned type is not exactly `TestController` but a proxy or a different implementation. The addition of tests using `@CompileStatic` suggests that the goal is to ensure that `mockController` and `mockInterceptor` correctly handle typed controllers and interceptors without requiring explicit casting in the test code. **grails-forge/grails-forge-cli/src/test/groovy/org/grails/forge/cli/command/CreateInterceptorCommandSpec.groovy** ``` - def controller = (TestController)mockController(TestController) + def controller = mockController(TestController) ``` -- 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]
