mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 21:44:18 +07:00
IDEA-68179 (Javac quirks inspection)
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
class C {
|
||||
@interface TestAnnotation {
|
||||
int[] value();
|
||||
}
|
||||
|
||||
@TestAnnotation({0, 1<warning descr="Trailing comma in annotation array initializer may cause compilation error in some Javac versions (e.g. JDK 5 and JDK 6).">,</warning>})
|
||||
void m() { }
|
||||
}
|
||||
+10
-1
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon;
|
||||
import com.intellij.ExtensionPoints;
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.compiler.JavacQuirksInspection;
|
||||
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspection;
|
||||
import com.intellij.codeInspection.defUse.DefUseInspection;
|
||||
import com.intellij.codeInspection.reference.EntryPoint;
|
||||
@@ -32,7 +33,11 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new UnusedSymbolLocalInspection(), new UncheckedWarningLocalInspection()};
|
||||
return new LocalInspectionTool[]{
|
||||
new UnusedSymbolLocalInspection(),
|
||||
new UncheckedWarningLocalInspection(),
|
||||
new JavacQuirksInspection()
|
||||
};
|
||||
}
|
||||
|
||||
public void testDuplicateAnnotations() throws Exception {
|
||||
@@ -207,4 +212,8 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testPreciseRethrow() throws Exception {
|
||||
doTest(false, false);
|
||||
}
|
||||
|
||||
public void testJavacQuirks() throws Exception {
|
||||
doTest(true, false);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -59,15 +59,15 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
myUnusedSymbolLocalInspection = new UnusedSymbolLocalInspection();
|
||||
return new LocalInspectionTool[]{
|
||||
new SillyAssignmentInspection(),
|
||||
new AccessStaticViaInstance(),
|
||||
new DeprecationInspection(),
|
||||
new RedundantThrowsDeclaration(),
|
||||
myUnusedSymbolLocalInspection,
|
||||
myUnusedSymbolLocalInspection = new UnusedSymbolLocalInspection(),
|
||||
new UnusedImportLocalInspection(),
|
||||
new UncheckedWarningLocalInspection()};
|
||||
new UncheckedWarningLocalInspection()
|
||||
};
|
||||
}
|
||||
|
||||
public void testCanHaveBody() throws Exception { doTest(false, false); }
|
||||
|
||||
Reference in New Issue
Block a user