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 203795

Summary: "Change method parameters" refactoring breaks compilation
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: Code ModelAssignee: Vladimir Voskresensky <vv159170>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Kvashin 2011-10-17 06:29:13 UTC
If check box "Use ... default value only in declaration" is on,
refactoring produces code that does not compile, because the default value in declaration is commented out.

Here is an example of generated code

void foo(int par0 /* = 0 */) { // this "=0" should be uncommented!!!
}

void foo_caller() {
    foo();
}
Comment 1 Quality Engineering 2011-10-18 01:31:10 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a8368b521830
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #203795 - "Change method parameters" refactoring breaks compilation
- when function has only one declaration which is definition => put default value in signature