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 238271

Summary: [Replace Constructor With Builder] undo doesn't work when default value is set
Product: java Reporter: ssazonov
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Dialog
After refactoring

Description ssazonov 2013-11-12 13:12:23 UTC
Created attachment 142092 [details]
Dialog

1. Create new java project and add 2 simple java classes:

package test;

public class ClassA {

	private  int const1;
	private int var1;

	public ClassA(int const1, int var1){
		this.const1 = const1;
		this.var1 = var1;
	}
}

---------------------------------

package test;

public class ClassB {

	private void m1(){
		ClassA ca2 = new ClassA(10,5);
	}
}

2. Close bothe classes and open them again

3. Put caret into "ClassA ca2 = new Cla|ssA(10,5);", where '|' is a position of caret

4. From main menu select Refactor > Replace Bonstructor With Builder, set dialog accordin attached image and pres Refactor

>> When you switch to ClassB, it is impossible to perform Undo
Comment 1 ssazonov 2013-11-12 13:12:47 UTC
Created attachment 142093 [details]
After refactoring
Comment 2 Martin Balin 2016-07-07 07:18:24 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss