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 238266

Summary: [Replace Constructor With Bulider] should resolve imports
Product: java Reporter: ssazonov
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description ssazonov 2013-11-12 11:13:32 UTC
1. Assume following simple java class:

package replace_constructor;

import java.util.List;

public class ClassA {

	private final int const1;
	private int var1;
	private List<String> list;

	public ClassA(int const1, int var1, List<String> list){
		this.const1 = const1;
		this.var1 = var1;
		this.list = list;
	}

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

>> If you call Refactror > Replace Constructor With Bulider... on "public ClassA(int const1, int var1, List<String> list)", it doesn't add "import java.util.List;" to builder class

Product Version: NetBeans IDE Dev (Build 201311120002)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Ralph Ruijs 2015-07-13 13:24:16 UTC
changeset:   c789cc302978
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Mon Jul 13 15:22:33 2015 +0200
summary:     #238266 - [Replace Constructor With Bulider] should resolve imports
Comment 2 Quality Engineering 2015-07-14 01:17:16 UTC
Integrated into 'main-silver', will be available in build *201507140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c789cc302978
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #238266 - [Replace Constructor With Bulider] should resolve imports