NullableStuffInspectionTest: use jdk 8

This commit is contained in:
peter
2017-05-15 13:32:46 +02:00
parent 845d863db0
commit f6885971b9
2 changed files with 4 additions and 8 deletions
@@ -22,14 +22,9 @@ class PPP2 extends P2 {
/////// in library
interface Foo {
@NotNull
String getTitle();
}
<error descr="Unhandled exception: java.awt.HeadlessException">class FooImpl extends java.awt.Frame implements Foo</error> {
// public String getTitle() {
// return super.getTitle(); //To change body of overridden methods use File | Settings | File Templates.
// }
@NotNull Object get(int i );
}
class FooImpl extends java.util.ArrayList implements Foo { }
interface I1 {
@@ -22,6 +22,7 @@ import com.intellij.codeInspection.nullable.NullableStuffInspection;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.util.Disposer;
import com.intellij.testFramework.IdeaTestUtil;
import com.intellij.testFramework.LightProjectDescriptor;
import com.intellij.testFramework.PsiTestUtil;
import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor;
@@ -32,7 +33,7 @@ public class NullableStuffInspectionTest extends LightCodeInsightFixtureTestCase
private static final DefaultLightProjectDescriptor PROJECT_DESCRIPTOR = new DefaultLightProjectDescriptor() {
@Override
public Sdk getSdk() {
return PsiTestUtil.addJdkAnnotations(super.getSdk());
return PsiTestUtil.addJdkAnnotations(IdeaTestUtil.getMockJdk18());
}
};
private NullableStuffInspection myInspection = new NullableStuffInspection();