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 262796

Summary: IllegalStateException: Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
Product: java Reporter: jockel <jockel>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 225210
Attachments: stacktrace

Description jockel 2016-07-13 10:31:11 UTC
This bug was originally marked as duplicate of bug 235884, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201607120002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.31-b07, Java(TM) SE Runtime Environment, 1.8.0_31-b13
OS: Linux

User Comments:
jockel: Used Alt+Shift+V to introduce a variable within an inner class




Stacktrace: 
java.lang.IllegalStateException: Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
   at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getCompilationUnit(CompilationInfoImpl.java:220)
   at org.netbeans.api.java.source.CompilationInfo.getCompilationUnit(CompilationInfo.java:184)
   at org.netbeans.api.java.source.TreeUtilities.pathFor(TreeUtilities.java:294)
   at org.netbeans.api.java.source.TreePathHandle$TreeDelegate.resolvePathForPos(TreePathHandle.java:502)
   at org.netbeans.api.java.source.TreePathHandle$TreeDelegate.resolve(TreePathHandle.java:495)
   at org.netbeans.api.java.source.TreePathHandle.resolve(TreePathHandle.java:153)
Comment 1 jockel 2016-07-13 10:31:13 UTC
Created attachment 160365 [details]
stacktrace
Comment 2 Svata Dedic 2016-07-18 14:06:34 UTC
Duplicate of issue #262721

*** This bug has been marked as a duplicate of bug 262721 ***