Summary: | Error on Extract Method Refactoring | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Rainer Schmitz <Rainer.Schmitz> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P2 | ||
Version: | 2.0 | ||
Target Milestone: | 2.0 M6 | ||
Hardware: | PC | ||
OS: | Windows NT | ||
Whiteboard: |
Description
Rainer Schmitz
2002-05-16 08:09:38 EDT
It would be nice to know which build you are using and the piece of code you selected. Build 20020416, JDK 1.4 While providing a test case i figured the bug only occurs if in the class contains an assert statement (JDK 1.4). This can be anywhere, not nesseccarily in the method to refactor. Testcase: Try extract method on a line of method bugTest() (will not work), then comment out the assert statement in containsAssert() and try again (will work): public class BugTest { public void bugTest() { System.out.println("bla"); System.out.println("blubb"); } private void containsAssert() { assert true; } } Ok, thanks for the test case. I am working on it. A quick question to be sure. Is your compiler set to accept assert statements? Yes. Settings: Preferences -> Java -> Compiler -> Compiler compliance level: 1.4 Use default compliance settings. Everything compiles and works as expected (even "Organize Imports" which used to hickup on assert some builds ago) I successfully reproduced the problem. It should be fixed today. Fixed and released in HEAD. Fixed. |