Class.forName editor bug
I'm instantiating an instance of a Class based on what's in a properties file, like this:
display = (Display)Class.forName( Client.mainProps.getProperty( "display.class" ) ).newInstance();
The editor is marking this line red, with the error message:
Inconvertible types; cannot cast '?' to 'mypackage.Display'
But it compiles and runs ok, just annoying. Why is the editor complaining?
Darrel
请先登录再写评论。
Idea 4.5.4 on windows, build 2253
It's a bug. Fixed in upcoming 5.0
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"