Comments (6)
This behavior wasn't present in our project for Grails 5.x. We first noticed it when we updated to Grails 6.x.
from grails-core.
Here's a screenshot of the byte code generated by Grails for the list
action that gets created to handle command object creation:
I've circled in red what's causing the cast exception.
from grails-core.
That is interesting! Could you also post the generated code when the variable is renamed?
from grails-core.
If I rename the variable in the edit action, here's the generated code of the list action:
from grails-core.
FYI: I ran into this too.
I found that if I use the method parameter name 'cmd' for the command object, then it fails:
def save(AssessmentCommand cmd) {
produces the org.codehaus.groovy.runtime.typehandling.GroovyCastException when I call save().
But when changing the parameter named to 'acmd', everything works as expected:
def save(AssessmentCommand acmd) {
from grails-core.
I've learned a bit more... it is not JUST the name. I have another case where the name of the parameter is 'cmd' and it works just fine.
from grails-core.
Related Issues (20)
- Deprecate the old grails-shell project HOT 5
- grails 6.1.2: migrating away from grails run-app affects hotreloading of grails plugin in a gradle multi-module project HOT 3
- CVE-2024-22243 on Spring Framework HOT 1
- Grails 6.1.2 - Service injection not working on Command Object HOT 2
- Unable to serve static html HOT 2
- Grails 6.1.2 - Application fails to render default page when started with java -Dgrails.env=dev -jar myapp-0.1.war HOT 3
- missing `bin/grails` and `bin/grails.bat` for 6.2.0 release HOT 3
- Release Grails 6.2.0 on sdkman HOT 1
- Native OSX File Event Watcher does not load on Apple Silicon (Grails 6.1.2)
- FAILURE: Execution failed for task ':findMainClass'.
- Grails 5.3.3 GroovyAwareInfrastructureAdvisorAutoProxyCreator is not a known auto-proxy creator class
- Local bootrun issue with Grails 6.1.2 and 6.2.0 HOT 4
- Error during @ToString processing: 'includes' property on Extended Object in Grails 6.2.0 HOT 3
- What is the replacement of "Custom Scripts" in Grails >= 6.1.0 ? HOT 1
- Mock Service | Grails 5.3.3 HOT 10
- Grails 5.3.6 multi-project log not injected into plugin services HOT 3
- No qualifying bean of type 'grails.plugins.GrailsPluginManager' available HOT 1
- Could not find org.grails:grails-shell:. Required by: org.grails.plugins:database-migration:4.2.1 HOT 5
- Review and Update Contribution Guide at Grails Documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grails-core.