-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
Possible ClassCastException when resolving AtmosphereResource #1561
Comments
As ugly as it look, that's true except right now only one implementation of AtmosphereResource exists...legacy code, welcome to fix that mess :-) |
Two options for us:
|
Ya but the issue with no interface is Spring will complains/not work. So we need to be careful IMO, but I'm all for it as it will greatly improve code readability. |
Exactly, if user enables spring extension we will delegate instantiation to an ObjectFactory that uses an application context to create bean. Any reason to create an AtmosphereResource using spring ? If not we can mark the class as a "reserved" class. The AtmosphereFramework will intercept any marked class and instantiate it itself instead of delegating this task to the ObjectFactory. Maybe other classes only managed by the framework are good candidate for it. |
The |
Was very strange the first time I read your comment but I finally understood what you want to do! Yes it's a very good idea :-) |
Won't fix this issue as it is too risky for a 2.x changes. In 3.0 those issues are fixed. |
As far as I understand the code, this can produce a ClassCastException if the user set an ObjectFactory which does not return an AtmosphereResourceImpl
The text was updated successfully, but these errors were encountered: