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 - NullPointerException at org.netbeans.modules.java.source.usages.ClassFileUtil.encodeType
Summary: NullPointerException at org.netbeans.modules.java.source.usages.ClassFileUtil...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-19 01:17 UTC by ionuion
Modified: 2013-03-25 18:10 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 196192


Attachments
stacktrace (1.38 KB, text/plain)
2012-12-19 01:17 UTC, ionuion
Details
stacktrace (5.35 KB, text/plain)
2013-01-16 18:22 UTC, misterm
Details
stacktrace (1.23 KB, text/plain)
2013-01-16 19:43 UTC, misterm
Details
stacktrace (4.92 KB, text/plain)
2013-02-08 16:34 UTC, misterm
Details
stacktrace (1.31 KB, text/plain)
2013-03-25 14:33 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
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