grails-core
grails-core copied to clipboard
Grails 6.2.0 - Cast Exception if Action takes Command
Expected Behavior
After upgrading to Grails 6.2.0, one of our controllers started to error. I was able to reproduce this issue in a sample application. Visiting http://localhost:8080/example/list should render the list action renders without issue. Instead an exception is thrown.
Changing a variable name in an unrelated action fixes the issue.
Actual Behaviour
A class cast exception occurs:
Cannot cast object 'brokenBinding.ExampleSearchCommand@116e5496' with class 'brokenBinding.ExampleSearchCommand' to class 'brokenBinding.ExampleCommand'
Steps To Reproduce
Details in README.md
- Launch grails app
- Visit http://localhost:8080/example/list
Environment Information
- Operating System: Mac OS 14.4.1 & Latest Stable Linux (Debian)
- JDK: 11.0.22 Liberica (.sdkmanrc has version in example project)
Example Application
https://github.com/jdaugherty/grails-broken-binding
Version
6.2.0