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 205053 - Refactor Push Down: Duplicates Comment on Method & Fields For Each Subclass
Summary: Refactor Push Down: Duplicates Comment on Method & Fields For Each Subclass
Status: RESOLVED DUPLICATE of bug 208705
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.1
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-13 17:24 UTC by MackSix
Modified: 2012-04-10 07:49 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 MackSix 2011-11-13 17:24:48 UTC
Suppose you have a SuperClass like this:

public class SuperClass {

    public void method1() {
    }

    /**
     * 
     * Something should really go here.
     * 
     */    
    public void method2() {
    }

}

and SubClasses like this:

public class NewClass1 extends SuperClass {

    public void methodA() {
    }
    
}

public class NewClass2 extends SuperClass {

    public void methodA() {
    }

}

public class NewClass3 extends SuperClass {
    
    public void methodA() {
    }
}

If you push down method2 in SuperClass, it duplicates the comments above it for each class that the method is pushed down to. Resulting in:

public class NewClass1 extends SuperClass {

    public void methodA() {
    }
    
    /**
     * 
     * Something should really go here.
     * 
     */    
    public void method2() {
    }
}

public class NewClass2 extends SuperClass {

    public void methodA() {
    }
    
    /**
     * 
     * Something should really go here.
     * 
     */
    /**
     * 
     * Something should really go here.
     * 
     */       
    public void method2() {
    } 
}

public class NewClass3 extends SuperClass {
    
    public void methodA() {
    }
    
     /**
     * 
     * Something should really go here.
     * 
     */
    /**
     * 
     * Something should really go here.
     * 
     */
    /**
     * 
     * Something should really go here.
     * 
     */         
    public void method2() {
    }
}
Comment 1 MackSix 2011-11-13 17:26:33 UTC
Product Version: NetBeans IDE Dev (Build 201111120600)
Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 2 MackSix 2011-11-14 03:01:45 UTC
This applies to comments on Fields too.
Comment 3 MackSix 2012-04-08 06:41:31 UTC
Still Valid in v7.1.1


Fixed in:

Product Version: NetBeans IDE Dev (Build 201204060400)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb
Comment 4 Ralph Ruijs 2012-04-10 07:49:45 UTC

*** This bug has been marked as a duplicate of bug 208705 ***