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 197057 - Duplicated commnets during Pull Up
Summary: Duplicated commnets during Pull Up
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-24 18:15 UTC by Jan Becicka
Modified: 2011-03-28 08:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Unit Test (7.30 KB, application/octet-stream)
2011-03-25 09:11 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2011-03-24 18:15:41 UTC
Product Version = NetBeans Platform Dev (Build 110310-ad4af61c7e83)
Operating System = Mac OS X version 10.5.8 running on x86_64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02-334

Only dev build issue - not in 7.0 due to some changes in refactoring.

public class NewClass extends A {

    private void a() {
        //aa
    }

    private void b() {
        //bb
    }

}
class A {
    
}


Pull Up both methods (a(), b()) to class A

both comments in both methods are duplicated:

public class NewClass extends A{
}
class A {

    protected void a() {
        //aa
        //aa
    }

    protected void b() {
        //bb
        //bb
    }
    
}
Comment 1 Jan Becicka 2011-03-24 18:20:34 UTC
I'm not sure, but it looks like issue in java/source. I call GeneratorUtilities.importComments() exactly once for each method, which is being pulled up. But maybe I do something wrong.
Comment 2 Jan Becicka 2011-03-25 06:31:48 UTC
I will create minimal unit test showing this issue.
Comment 3 Jan Lahoda 2011-03-25 09:01:05 UTC
I most likely see where the problem is.
Comment 4 Jan Becicka 2011-03-25 09:11:59 UTC
Created attachment 107273 [details]
Unit Test
Comment 5 Jan Lahoda 2011-03-25 12:16:41 UTC
Thanks for the report.
http://hg.netbeans.org/jet-main/rev/fb16a734bd85
Comment 6 Quality Engineering 2011-03-28 08:48:33 UTC
Integrated into 'main-golden', will be available in build *201103280400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fb16a734bd85
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #197057: preventing duplicate assignments of inner comments.