| Summary: | Cleanup, Indent after assert is wrong | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Tonni Tielens <tonnitielens> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | tonnitielens |
| Version: | 4.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| Whiteboard: | stalebug | ||
My description is not entirely true. It only appears when the assert also contains a message, as in the example below:
switch (foobar) {
case Foobar.ONE:
break;
default:
assert false : "Some message";
break;
}
When there is no message, or when the false keyword is wrapped in parentheses, the indentation is correct.
E.g.
switch (foobar) {
case Foobar.ONE:
break;
default:
assert false;
break;
}
or
switch (foobar) {
case Foobar.ONE:
break;
default:
assert (false) : "Some message";
break;
}
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. |
In the following piece of code: switch (foobar) { case Foobar.ONE: break; default: assert false; break; } Running Indent (CTLR+I) results in: switch (foobar) { case Foobar.ONE: break; default: assert false; break; } The last break is indented wrong.