-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Receive Long collection in MessageMapping #11227
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
Comments
Indeed, please raise an issue in Spring Framework issue tracker. Rather than a code snippet, please attach a sample that we can run and how you reproduced the issue. Thank you. |
I suffered the same problem. Can you attach a link to the solution? Thank you. |
This is the Spring Framework issue that was opened: spring-projects/spring-framework#20799. |
I know why. thank you. I'm using Springboot 1.5.9 now. The cost of updating is very high. Besides the method in the link, how can I solve this problem? |
In addition to being fixed in Spring Framework 5.0.x, the fix was back-ported to 4.3.14 which is included in Spring Boot 1.5.10. 1.5.10 should be a drop-in replacement for 1.5.9. I would strongly encourage you to upgrade to the latest 1.5.x release which, the time time of writing, is 1.5.19. You should also start preparing to upgrade to Spring Boot 2 as 1.5 will reach the end of its life in August this year. |
The problem hasn't been solved. I upgraded Springboot to 1.5.10 and the version that relies on spring-web packages to 4.3.14, but I still can't. Do you need any other configuration? |
Please open a new Spring Framework issue with a minimal sample that reproduces the problem. |
When you try to receive a collection of Long values, as parameter of a MessageMapping method (from spring messaging), you can print the collection. But if you try to access its values, there is an exception throw about not being able to cast Integer to Long.
Replicate it is easy:
Exception throw is java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
Spring boot version: 1.5.8.RELEASE
Probably the bug is not related to spring boot, but I wasn't able to find where to report it for spring framework project. Please if its required to move it just let me know and I will without any problem. I just need to know where to report it.
The text was updated successfully, but these errors were encountered: