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 254836

Summary: Auto-fixing Javadoc problems duplicates, in a special case, the editor-fold closing tag
Product: java Reporter: stwr
Component: SourceAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: ralphbenjamin
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
See Also: https://netbeans.org/bugzilla/show_bug.cgi?id=255742
Issue Type: DEFECT Exception Reporter:
Attachments: Test.java
Duplicated closing tag

Description stwr 2015-08-29 06:14:43 UTC
Created attachment 155734 [details]
Test.java

Product Version: NetBeans IDE Dev (Build 201508280002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)

I am not sure whether is it the java|Javadoc or editor|Code folding issue. However..

--Use Case--

1. Open attached Test.java
2. Analyze Javadoc for the class
3. Inside the Analyzer tab panel check the entire 'Test.java' and hit 'Fix Selected'

--Actual Result--
The <editor-fold> closing tag is duplicated at line 22 (please see the picture 'Duplicated closing tag').

My analyze showed that the issue does not occur when there is no empty line between the <editor-fold> closing tag and the doMeRightToo(int x) method declaration - line 18 in the original Test.java.
This issue may have common reason with a reason of bug 254835.
Comment 1 stwr 2015-08-29 06:15:06 UTC
Created attachment 155735 [details]
Duplicated closing tag
Comment 2 Jiri Prox 2015-10-15 09:07:28 UTC
reproducible
Comment 3 Svata Dedic 2016-07-01 16:09:34 UTC
OK, troubles are caused by generating javadoc for the 2nd method. For some reason, the preceding line comment is duplicated.