Community
Participate
Working Groups
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
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.