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.
JDK 5 introduces the auto boxing and unboxing feature. The compiler silently applies the boxing and unboxing of primitive types to corresponding object types and back in many places (e.g. int->Integer and Integer->int). This helps the user many times. However it also introduces strange NPEs at run time while auto-unboxing, which puzzles the user completely. It may be that javac must warn the user of that possibility at least once in a file. But that is a separate enhancement against javac. This and other related issues with auto boxing and unboxing were discussed in one of the talks at JavaOne also. I think with the help of the Java editor infrastructure, it should be possible to support a mode in the Java editor to show all the expressions where the auto boxing and unboxing is happening. There should be a way to control showing/hiding of this highlight. I think we should use a subtle but noticable highlight for this. IMHO this should not be mixed in with the Mark Occurrences mode as someone (don't recall who) suggested - as there could be overlaps. Also highlight auto boxing/unboxing is not caret sensitive.
The Highlight Boxing Unboxing Varargs module (http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=4130) implements this functionality.
Hi Folks, the plugin that is referenced from the comment before is experimental and obviously not maintained for NB 7/8. I really think that this feature should be added to NB asap! best regards, Stephan