EA-26767 - NPE: ExtractMethodProcessor.doRefactoring

This commit is contained in:
anna
2011-06-30 12:23:06 +04:00
parent 68c682ce6b
commit 34151b68df
4 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
import java.io.IOException;
class Test {
void foo(Exception targetElement) {
PsiPackage aPack = <selection>JavaDirectoryService.getInstance().getPackage((IOException)targetElement)</selection>;
}
}

View File

@@ -0,0 +1,11 @@
import java.io.IOException;
class Test {
void foo(Exception targetElement) {
PsiPackage aPack = newMethod((IOException) targetElement);
}
private PsiPackage newMethod(IOException targetElement) {
return JavaDirectoryService.getInstance().getPackage((IOException)targetElement);
}
}