mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-inspections] Use latest mockJDK instead of mocking individual classes
GitOrigin-RevId: 5bdde04b83f4a66e373724bc40ea5d129467bf25
This commit is contained in:
committed by
intellij-monorepo-bot
parent
15bb3eb9f4
commit
2c31e99a77
@@ -1,7 +1,9 @@
|
||||
package com.siyeh.ig.bugs;
|
||||
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.siyeh.ig.LightJavaInspectionTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ClassNewInstanceInspectionTest extends LightJavaInspectionTestCase {
|
||||
@@ -17,10 +19,7 @@ public class ClassNewInstanceInspectionTest extends LightJavaInspectionTestCase
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] getEnvironmentClasses() {
|
||||
return new String[] {
|
||||
"package java.lang;" +
|
||||
"public class InstantiationException extends Exception {}"
|
||||
};
|
||||
protected @NotNull LightProjectDescriptor getProjectDescriptor() {
|
||||
return JAVA_LATEST_WITH_LATEST_JDK;
|
||||
}
|
||||
}
|
||||
+4
-14
@@ -2,7 +2,9 @@
|
||||
package com.siyeh.ig.portability;
|
||||
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.siyeh.ig.LightJavaInspectionTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -11,20 +13,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class HardcodedFileSeparatorsInspectionTest extends LightJavaInspectionTestCase {
|
||||
|
||||
@Override
|
||||
protected String[] getEnvironmentClasses() {
|
||||
return new String[] {
|
||||
"package java.net;" +
|
||||
"public final class URL implements java.io.Serializable { " +
|
||||
"public URL(String spec) throws MalformedURLException { " +
|
||||
" this(null, spec);" +
|
||||
"}}",
|
||||
|
||||
"package java.net;" +
|
||||
"public final class URI implements java.io.Serializable { " +
|
||||
"public URI(String str) throws URISyntaxException { " +
|
||||
" new Parser(str).parse(false);" +
|
||||
"}}",
|
||||
};
|
||||
protected @NotNull LightProjectDescriptor getProjectDescriptor() {
|
||||
return JAVA_LATEST_WITH_LATEST_JDK;
|
||||
}
|
||||
|
||||
public void testHardcodedFileSeparators() {
|
||||
|
||||
Reference in New Issue
Block a user