| Summary: | [quick fix] Dead code quick fix leaves extra braces | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | John Arthorne <john.arthorne> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert |
| Version: | 3.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 258072 *** |
I20100209-2300 I have code like this: Object o = getObject(); if (o != null) { if (o == null) { System.out.println("hello"); } else { System.out.println("bye"); } } It correctly reports dead code in the inner if statement. However, when I invoke the quick fix I end up with: Object o = getObject(); if (o != null) { { System.out.println("bye"); } } I think it should remove the extra set of braces here. Other quickfixes such as "remove unnecessary else clause" don't leave the braces behind.