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 206086

Summary: [Move Inner To Outer Level] Comments are doubled
Product: java Reporter: Jiri Prox <jiriprox>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: VERIFIED DUPLICATE    
Severity: normal CC: gtzabari, jlahoda, pvdissel
Priority: P2    
Version: 7.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description Jiri Prox 2011-12-07 14:42:11 UTC
Method and field javadoc comments in moved class are doubled when moving inner to outer level 

class:
public static class Inner {
        /**
         * comment
         */
        public void method() {
            
        }
        
        /**
         * comment
         */
        public int x;
    }

is changed to:
public class Inner {

    /**
     * comment
     */
    /**
     * comment
     */
    public void method() {
    }
    /**
     * comment
     */
    /**
     * comment
     */
    public int x;
    
}



Product Version: NetBeans IDE 7.1 (Build 201112062100)
Java: 1.7.0_02; Java HotSpot(TM) 64-Bit Server VM 22.0-b10
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\.netbeans\7.1
Cache directory: C:\Users\jprox\.netbeans\7.1\var\cache
Comment 1 Jan Lahoda 2011-12-09 16:21:14 UTC
Same root cause as bug #205525: as there are no comments for Inner, importComments does not mark it correctly with comments mapped mark, and copyComments then does the importComments again.

Fixing #205525 will fix this too, but I have filed a new bug (#206200) to make importComments idempotent. The difference is that the fix for #205525 will be a good candidate for a patch fix, fix for #206200 probably won't.

*** This bug has been marked as a duplicate of bug 205525 ***
Comment 2 Jiri Prox 2011-12-13 13:37:54 UTC
*** Bug 206325 has been marked as a duplicate of this bug. ***
Comment 3 Jiri Prox 2012-02-06 13:43:08 UTC
v.