NPE: check raw substitution during inline

This commit is contained in:
anna
2010-06-16 12:43:29 +04:00
parent 45c91b9b44
commit bfc75928b9
4 changed files with 38 additions and 0 deletions
@@ -0,0 +1,16 @@
public class NotRaw<T> {
T g<caret>et(T t){
T tt = t;
if ( t == null) {
return null;
} else
return null;
}
}
class Raw extends NotRaw {
void foo() {
Object o = get(null);
}
}
@@ -0,0 +1,15 @@
public class NotRaw<T> {
}
class Raw extends NotRaw {
void foo() {
Object result;
Object tt = null;
if ( null == null) {
result = null;
} else
result = null;
Object o = result;
}
}
@@ -153,6 +153,10 @@ public class InlineMethodTest extends LightCodeInsightTestCase {
doTest();
}
public void testRawSubstitution() throws Exception {
doTest();
}
@Override
protected Sdk getProjectJDK() {
return JavaSdkImpl.getMockJdk15("java 1.5");