| Summary: | [extract method] Should move @SuppressWarnings annotation while extracting method | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Tomasz Bartczak <kretes> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | ASSIGNED --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | daniel_megert, markus.kell.r, Olivier_Thomann |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | fix candidate | ||
Move to JDT/UI Would be a cool feature to actually move and/or copy the corresponding @SuppressWarnings annotation so that the amount of problems stays the same. |
Build Identifier: 20100617-1415 when I'm extracting method that has some code covered by @SuppressWarnings - annotation is not transfered to extracted method, which causes additional warnings. Example: @SuppressWarnings({ "unchecked", "rawtypes" }) public void extractMethodTest(List list) { list.add(""); } Annotation @SuppressWarnings is covering first line of this method. Now I extract list.add(""); to a new method and get: @SuppressWarnings({ "unchecked", "rawtypes" }) public void extractMethodTest(List list) { extracted(list); } private boolean extracted(List list) { return list.add(""); } while it shoule be @SuppressWarnings({ "rawtypes" }) public void extractMethodTest(List list) { extracted(list); } @SuppressWarnings({ "rawtypes", "unchecked" }) private boolean extracted(List list) { return list.add(""); } to keep the rule that if something was suppressed it should be suppressed after refactoring. Reproducible: Always