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 122732 - regression? "Encapsulate field" will add duplicate comment
Summary: regression? "Encapsulate field" will add duplicate comment
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-26 03:49 UTC by Masaki Katakai
Modified: 2009-06-22 10:40 UTC (History)
1 user (show)

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 Masaki Katakai 2007-11-26 03:49:39 UTC
NetBeans 6.0 RC2:

Comment will be included in the result of "Encapsulate field".
The behavior is different from 5.5.1.

Try "Encapsulate field" for the following codes.

Source
--
public class Main {
    /* test */
    int a;
}
--

Result NB6.0: /* test */ will be added for getA()
--
public class Main {
    /* test */
    private int a;

    public /* test */
    int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }
}
--

Result NB5.5.1:
--
public class Main {
    /* test */
    private int a;

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }
}
--
Comment 1 Jiri Prox 2008-04-11 00:52:42 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 2 Jan Becicka 2008-11-12 07:35:46 UTC
Still reproducible?
Comment 3 Jiri Prox 2008-11-12 15:52:39 UTC
yes, I can still reproduce it
Comment 4 Max Sauer 2009-02-16 12:07:02 UTC
Reassign...
Comment 5 Rastislav Komara 2009-04-01 15:31:16 UTC
This looks like problem of refactoring. Maybe the is some sort of tree copied and with comment together. 
Comment 6 Rastislav Komara 2009-06-22 10:40:06 UTC
Already fixed. This issue is duplicate of another already fixed issue or I forgot to mark it as fixed.