Bug 501860 - [clean up] Clean up "Convert control statement bodies to block" deletes comments.
Summary: [clean up] Clean up "Convert control statement bodies to block" deletes comme...
Status: CLOSED DUPLICATE of bug 250142
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-20 13:45 EDT by Gary Gregory CLA
Modified: 2016-09-22 09:33 EDT (History)
1 user (show)

See Also:


Attachments
Clean up "Convert control statement bodies to block" deletes comments. Please see the attached screenshot. (199.08 KB, image/png)
2016-09-20 13:45 EDT, Gary Gregory CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Gregory CLA 2016-09-20 13:45:47 EDT
Created attachment 264293 [details]
Clean up "Convert control statement bodies to block" deletes comments. Please see the attached screenshot.

[clean up] Clean up "Convert control statement bodies to block" deletes comments. Please see the attached screenshot.

Version: Oxygen (4.7)
Build id: I20160915-0230
Comment 1 Manoj N Palat CLA 2016-09-22 04:22:37 EDT
Reproduced with the following code snippet:


public class X {
	public static void main(String[] args) {	
		if (args.length > 0) {
			// comment zero does not get deleted
			if (args.length == 1) return;
			// comment one gets deleted
			else if (args.length == 2) return;
			// comment two  gets deleted
			else return;
		}
	}
} 

@Mateusz: could you please take a look?
Comment 2 Mateusz Matela CLA 2016-09-22 09:23:49 EDT
Doesn't look like a formatter issue, rather possible duplicate of bug 250142.
There's already a duplicate with almost identical summary: bug 491720.
I'll leave it to Noopur to decide if this one can be fixed separately (like i.e. bug 488933) or closed as duplicate.
Comment 3 Noopur Gupta CLA 2016-09-22 09:33:18 EDT
This is a duplicate of bug 250142 and can't be fixed based on bug 250142 comment #12.

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