-
-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grails 6.2.2: ClassCastException for inheritance in Commands #13945
Comments
Maybe relates to #13486 |
Class file: |
I added 2 tests for this issue under my 6.2.x branch & 7.x:
And the associated Commands:
And the associated action:
Neither of these tests are failing in either branch. I'm still researching. |
@jdaugherty could you push the tests? I'll try to help with reproducing of the issue |
Commit 268e386 reproduces this issue. I've gone ahead and marked the test with |
There seems to be some randomness. The test run passed unexpectedly so this leads me to believe there's an ordering issue involved. |
For me, it constantly fails with
|
…ing the object"" This reverts commit e8a07aa.
I accidentally pushed the fix for this to the 6.2.x branch, I reverted it there and then opened #13947 to fix this in 6.2.x. |
It can make sense to add |
…il prior to code fix
@jdaugherty Could you advise the tool for decompiling |
Hmm, both tests run successfully for me on 33b3dc1, without the changes to |
Could you try running the tests with clean?
|
I use http://java-decompiler.github.io/ to decompile groovy code. |
I checked my original project and it doesn't fail without And this looks logical because I don't expect calling |
@agre1981 Thanks, I managed to get the tests to fail now. |
fix #13945 - use local variable instead of casting the object
The 6.2.3-SNAPSHOT build is now published. @agre1981 can you please set your grails version to this version and let me know if it fixes this issue for you? |
@jdaugherty Yes, it works fine on Grails 6.2.3-SNAPSHOT. Great job! thank you! |
I'm going to close this ticket as fixed. I'm discussing with the other maintainers on when best to release this. Hopefully it's soon. |
We have released 6.2.3 to address this issue. |
Expected Behavior
Grails throws exception ClassCastException when we have 2 endpoints with inherited commands. It worked fine on 6.1.2.
Looks like this is a critical issue.
Actual Behaviour
Exception:
Steps To Reproduce
Reproduces on Grails 6.2.2. It worked fine on 6.1.2.
grails_6_2_2.zip
An example of the application has been attached:
./gradlew bootRun
Environment Information
Example Application
No response
Version
6.2.2
The text was updated successfully, but these errors were encountered: