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.
Product Version: NetBeans IDE Dev (Build 201504270341) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Windows 7 version 6.1 running on amd64; UTF-8; pl_PL (nb) Values displayed in tooltips for null member variables are incorrect. Looks like they show information about "this" instead of the variable. Test case: public class NullMember { String text; String dummy = ""; public NullMember() { } public String doNothing() { String localNull = null; for (int i = 1; i < 10; i++) { if (text == null) { dummy += i; } else { dummy += text; localNull += this; } } return localNull; } // @Override // public String toString() { // return "Dummy is " + dummy; // } } Put a breakpoint in the "doNothing" method. Hover over "text" variable - it will show "package.name.NullMember@1175e2db" instead of simply "null. Uncomment the "toString" method and it will become even more interesting - tooltip for "text" will show "Dummy is " instead of null.
Created attachment 153430 [details] Null member tooltip
Created attachment 153431 [details] Null member of class with overridden toString
Reproduced.
Reproduced as well. This is unfortunate. :-( Happens only with null variables.
Fixed by changeset: 287359:6272c5adfd1c http://hg.netbeans.org/core-main/rev/6272c5adfd1c
An additional change applied, which disables the expandability of null values: changeset: 287366:262e49bd804f http://hg.netbeans.org/core-main/rev/262e49bd804f
Integrated into 'main-silver', will be available in build *201505010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6272c5adfd1c User: mentlicher@netbeans.org Log: #252138: Do not attempt to evaluate toString() on a null variable.
Product Version: NetBeans IDE Dev (Build 201505040001) Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25 Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b25 System: Linux version 3.13.0-24-generic running on amd64; UTF-8; en_US (nb) Verified.
*** Bug 253493 has been marked as a duplicate of this bug. ***