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.
Summary: | IllegalStateException: Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first. | ||
---|---|---|---|
Product: | java | Reporter: | aldobrucale <aldobrucale> |
Component: | Refactoring | Assignee: | Ralph Ruijs <ralphbenjamin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aldobrucale, mkhramov |
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 203815 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace |
Description
aldobrucale
2013-09-12 14:36:13 UTC
Created attachment 139996 [details]
stacktrace
Created attachment 140502 [details]
stacktrace
Tried to safely delete a local variable
Created attachment 142966 [details]
stacktrace
Safely delete local variable
Created attachment 144409 [details]
stacktrace
Lookup find usages results immediately after IDE loaded
Created attachment 150338 [details]
stacktrace
Product Version: NetBeans IDE Dev (Build 201411070002)
Java: 1.8.0_40-ea; Java HotSpot(TM) 64-Bit Server VM 25.40-b11
Steps to reproduce:
Edit this code:
package javaapplication32;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class JavaApplication32 {
static Pattern pattern = Pattern.compile("\\s*\\b\\d+,?");
public static void main(String[] args) {
String textToMatch = "Hello World";
Matcher matcher = pattern.matcher(textToMatch);
boolean isMatched = matcher.matches();
if(isMatched) {
System.out.println("Matched");
}
}
}
Invoke Refactor - Inline over isMatched symbol in if(isMatched) line.
Exception is thrown
changeset: eb499ffac58d user: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date: Mon Mar 09 11:20:32 2015 +0100 summary: #235884 - Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED Integrated into 'main-silver', will be available in build *201503130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/eb499ffac58d User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: #235884 - Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED |