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.

Bug 104526

Summary: Support highlighting of auto boxing and unboxing
Product: java Reporter: _ sandipchitale <sandipchitale>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker CC: jrojcek, markiewb
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description _ sandipchitale 2007-05-22 17:01:23 UTC
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.
Comment 1 _ sandipchitale 2007-11-19 19:24:33 UTC
The Highlight Boxing Unboxing Varargs module
(http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=4130) implements this functionality.
Comment 2 stephan_bauer 2014-07-17 07:08:21 UTC
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