extract method: redundant cast treatments (IDEA-125259)

This commit is contained in:
Anna Kozlova
2014-05-20 14:17:04 +04:00
parent e11cf17923
commit ec9a61b8bd
4 changed files with 13 additions and 11 deletions
@@ -6,7 +6,7 @@ public class Test {
}
private void newMethod(A o) {
((A)o).bar();
o.bar();
}
}
@@ -6,6 +6,6 @@ class Test {
}
private String newMethod(String x) {
return ((String)x).substring(1);
return x.substring(1);
}
}
@@ -6,6 +6,6 @@ class Test {
}
private PsiPackage newMethod(IOException targetElement) {
return JavaDirectoryService.getInstance().getPackage((IOException)targetElement);
return JavaDirectoryService.getInstance().getPackage(targetElement);
}
}