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 253608

Summary: NullPointerException at com.sun.tools.javac.comp.Analyzer$LambdaAnalyzer.match
Product: java Reporter: Alexandr Scherbatiy <sunflower>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: abien, alexvsimon, clinuxrulz, jiriprox, ksrini, mps77, petrk, tboudreau, ttentinger
Priority: P2    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 218344
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description Alexandr Scherbatiy 2015-07-21 08:58:55 UTC
Build: NetBeans Dev JDK9 branch (Build 201506180405)
VM: Java HotSpot(TM) Client VM, 1.9.0-ea-b73, Java(TM) SE Runtime Environment, 1.9.0-ea-b73
OS: Windows 7

User Comments:
GUEST: the error occured  during normal usage of the editor, scrolling over the hint to replace anonymous class with lambda expression. I can't do that as the source level is set to 1.6 - i also think that the hint should be adjusted to current source level setting

GUEST: 1)I have created a list
2)In ArrayList<String>();
3)After selecting the String I got the popup showing the NullPointerException

sunflower: edit code




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.comp.Analyzer$LambdaAnalyzer.match(Analyzer.java:261)
   at com.sun.tools.javac.comp.Analyzer$LambdaAnalyzer.match(Analyzer.java:251)
   at com.sun.tools.javac.comp.Analyzer$StatementScanner.scan(Analyzer.java:422)
   at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
   at com.sun.tools.javac.tree.TreeScanner.visitApply(TreeScanner.java:203)
   at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1606)
Comment 1 Alexandr Scherbatiy 2015-07-21 08:58:57 UTC
Created attachment 154758 [details]
stacktrace
Comment 2 Dusan Balek 2015-08-06 10:23:26 UTC
*** Bug 253975 has been marked as a duplicate of this bug. ***
Comment 3 Exceptions Reporter 2015-11-02 20:51:59 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=218344
Comment 4 Jiri Prox 2015-12-10 09:43:16 UTC
Created attachment 157743 [details]
stacktrace

NPE when editing source
Comment 5 abien 2015-12-15 16:11:00 UTC
Created attachment 157798 [details]
stacktrace

Happened during copy and paste
Comment 6 Jiri Prox 2016-01-06 13:32:03 UTC
Created attachment 158028 [details]
stacktrace

NPE when trying reproduce issue 257431
Comment 7 Exceptions Reporter 2016-01-06 13:32:07 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=218344
Comment 8 Alexander Simon 2016-03-22 09:59:29 UTC
Created attachment 158961 [details]
stacktrace

go to usage
Comment 9 _ tboudreau 2016-06-24 17:57:27 UTC
Created attachment 160159 [details]
stacktrace

Opened a refactored file that references non-existent classes
Comment 10 Exceptions Reporter 2016-08-23 08:24:34 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=218344
Comment 12 Quality Engineering 2016-08-27 02:19:50 UTC
Integrated into 'main-silver', will be available in build *201608270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0a1f5b99e4d0
User: Dusan Balek <dbalek@netbeans.org>
Log: Issues #253608, #267646, and #267678 fixed.