mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJ-CR-143396 [java-inspection] IDEA-356207 incorrect work with typeUseWithType option
- more tests GitOrigin-RevId: 14fc2ab77a0659541423741c704437c7fba446b6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
172c2c8079
commit
4aa99fd33a
+2
@@ -6,6 +6,8 @@ class TypeUseWithTypeHighlighting {
|
||||
<warning descr="Missorted modifiers '@ReadOnly private'">@ReadOnly</warning>
|
||||
private String field;
|
||||
|
||||
<warning descr="Missorted modifiers '@ReadOnly private'">@ReadOnly</warning> private String fieldOneLine;
|
||||
|
||||
private <warning descr="Missorted modifiers '@ReadOnly final'">@ReadOnly</warning> <error descr="Variable 'field1' might not have been initialized">final String field1</error>;
|
||||
private final @ReadOnly String field2 = "2";
|
||||
}
|
||||
|
||||
+2
@@ -6,6 +6,8 @@ class TypeUseWithTypeHighlighting {
|
||||
@ReadOnly
|
||||
private String field;
|
||||
|
||||
@ReadOnly private String fieldOneLine;
|
||||
|
||||
private <warning descr="Missorted modifiers '@ReadOnly final'">@ReadOnly</warning> <error descr="Variable 'field1' might not have been initialized">final String field1</error>;
|
||||
private final @ReadOnly String field2 = "2";
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
class TypeUseWithType {
|
||||
|
||||
private @TestAnn<caret>otation1 String fieldOneLine;
|
||||
|
||||
@Target(value = { ElementType.TYPE_USE, ElementType.FIELD })
|
||||
public @interface TestAnnotation1 {
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
class TypeUseWithType {
|
||||
|
||||
<warning descr="Missorted modifiers '@TestAnnotation1 private'">@TestAnnotation1<caret></warning> private String fieldOneLine;
|
||||
|
||||
@Target(value = { ElementType.TYPE_USE, ElementType.FIELD })
|
||||
public @interface TestAnnotation1 {
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,9 @@ public class MissortedModifiersInspectionTest extends LightJavaInspectionTestCas
|
||||
public void testTypeUseWithTypeUseGenerated() {
|
||||
doTestQuickFix();
|
||||
}
|
||||
public void testTypeUseWithTypeUseGeneratedInline() {
|
||||
doTestQuickFix();
|
||||
}
|
||||
|
||||
public void testTypeUseWithTypeUseNotGenerated() {
|
||||
doTest();
|
||||
|
||||
Reference in New Issue
Block a user