This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I'd like to see more compiler-error autofixers. Here are some ideas: -- automatically add cast when it's missing -- handle length() vs length vs size() confusion -- not thrown exceptions - remove try block? (beware of finally() clause) -- catch uncaught exceptions - can you add try block or does that require too much refactoring intelligence?
length() vs size() confusion is now handled. Whenever you're referring to an unknown method "length", it checks the target class to see if it provides a size" method, and if so, offers to use it. And ditto for "size".
It also handles casts now. If you have e.g. Object o; Integer i = o; it will offer to insert a cast to make this Integer i = (Integer)o; and similarly if you have ArrayList l = (List)o; it will offer to change the cast to make this ArrayList l = (ArrayList)o; I think it will also handle casting for parameters in function calls; I noticed an off-by-one error the other day so I should go back and check that.