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 240458 - [Replace constructor with builder] Default values are incorrect for inner class
Summary: [Replace constructor with builder] Default values are incorrect for inner class
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-14 15:18 UTC by Jiri Prox
Modified: 2014-10-18 05:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2014-01-14 15:18:10 UTC
When calling Replace constructor with builder on inner class the pre-filled builde name is incorrect. If the user does not notice it the generated code is invalid.

Steps to reproduce:
1) have a code:
package remote;

public class NewClass {
    static class Inner {

        public Inner() {
        }
        
    }
}

2) call Replace constructor with builder on the inner constructor

-> the Builder class name is 'remote.NewClass.InnerBuilder'

but when performing refactoring (w/o any warning) the remote.NewClass package conflict with remote.NewClass class


Product Version: NetBeans IDE Dev (Build 20140109-5dd3d83bf20e)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b49
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b107
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 1 Ralph Ruijs 2014-10-16 13:01:48 UTC
changeset:   5587df4365da
tag:         tip
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Thu Oct 16 14:57:34 2014 +0200
summary:     #240458 - [Replace constructor with builder] Default values are incorrect for inner class
Comment 2 Quality Engineering 2014-10-18 05:10:56 UTC
Integrated into 'main-silver', will be available in build *201410180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5587df4365da
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #240458 - [Replace constructor with builder] Default values are incorrect for inner class