Bug 257524 - [formatter] Formatter breaks indentation after unreachable code in SwitchStatement
Summary: [formatter] Formatter breaks indentation after unreachable code in SwitchStat...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P5 minor (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Mateusz Matela CLA
QA Contact:
URL:
Whiteboard: To be verified for 4.14 M3
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-04 08:24 EST by Markus Keller CLA
Modified: 2019-11-20 16:54 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-12-04 08:24:46 EST
HEAD

Format this with the Eclipse [built-in] profile:

	void m() {
		switch (1) {
		case 1:
			System.out.println("Hello");
			break;
			System.out.println("Unreachable");
			break;
		case 2:
			System.out.println("Hello3");
			return;
		default:
			System.out.println("Hell4");
			break;
	}

Result is:

	void m() {
		switch (1) {
		case 1:
			System.out.println("Hello");
			break;
		System.out.println("Unreachable");
		break;
	case 2:
		System.out.println("Hello3");
		return;
	default:
		System.out.println("Hell4");
		break;
	}

=> The unreachable statement should not outdent the following SwitchCase. Indentation for the unreachable statement itself is less important, but I would also indent that one as if it were reachable.
Comment 1 Eclipse Genie CLA 2019-11-19 20:03:38 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Mateusz Matela CLA 2019-11-20 16:54:18 EST
Could not reproduce even in Eclipse Luna.