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 224003

Summary: NullPointerException at org.netbeans.modules.java.source.usages.ClassFileUtil.encodeType
Product: java Reporter: ionuion <ionuion>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal CC: hyzoom, jiriprox, misterm
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 196192
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description ionuion 2012-12-19 01:17:49 UTC
Build: NetBeans IDE Dev (Build jdk8lambda-1604-on-20121214)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-b18
OS: Mac OS X

User Comments:
GUEST: Editing file




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.java.source.usages.ClassFileUtil.encodeType(ClassFileUtil.java:247)
   at org.netbeans.modules.java.source.usages.ClassFileUtil.createExecutableDescriptor(ClassFileUtil.java:198)
   at org.netbeans.api.java.source.ElementHandle.createImpl(ElementHandle.java:449)
   at org.netbeans.api.java.source.ElementHandle.create(ElementHandle.java:388)
   at org.netbeans.api.java.source.ElementHandle.signatureEquals(ElementHandle.java:359)
   at org.netbeans.modules.java.navigation.CaretListeningTask.run(CaretListeningTask.java:167)
Comment 1 ionuion 2012-12-19 01:17:51 UTC
Created attachment 129522 [details]
stacktrace
Comment 2 Exceptions Reporter 2012-12-21 05:50:09 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=196192
Comment 3 Tomas Zezula 2013-01-02 13:35:08 UTC
lambda branch
Comment 4 misterm 2013-01-16 18:22:33 UTC
Created attachment 130299 [details]
stacktrace
Comment 5 misterm 2013-01-16 19:43:35 UTC
Created attachment 130304 [details]
stacktrace
Comment 6 misterm 2013-02-08 16:34:44 UTC
Created attachment 131166 [details]
stacktrace
Comment 7 Jiri Prox 2013-03-25 14:33:44 UTC
Created attachment 133037 [details]
stacktrace

NPE when calling code completion at position marked by |

public static void main (String[] args) {


	Person[] people = {};
	Person a = new Person();
//	Arrays.sort(people, Person::compareByAge);
//	MyIface ddd = (name) -> {return name+"";};
	testReference("i1", (name)-> name+"x");

	testReference("i2", MyInnerClass::innerMethod);
	testReference("java.version", people::|getProperty);
    }
Comment 8 Dusan Balek 2013-03-25 18:10:04 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/0cd12866e297