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 60021

Summary: Broken code after Introducing variable
Product: java Reporter: Milan Kubec <mkubec>
Component: RefactoringAssignee: Daniel Prusa <dprusa>
Status: VERIFIED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Milan Kubec 2005-06-15 12:19:43 UTC
[dev-200506142000, JDK 1.5.0_04, Experimental Refac. 0.16.0.2.3 from AUC]

1) Have Constructor that calls super(); as it's first call
2) Select some expression in the constructor and do Refactor -> Introduce Variable
ERROR: Newly introduced variable is inserted before the super call that makes
the source code broken.
Comment 1 Daniel Prusa 2005-08-22 15:47:04 UTC
The problem is that the new variable is always added as the first statement of
the method body. In general, the proper place where to add the variable needs to
be computed.

*** This issue has been marked as a duplicate of 60103 ***
Comment 2 Milan Kubec 2005-10-31 13:45:20 UTC
V