mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 19:28:23 +07:00
Java inspection: Added a fix for single-value annotations where the annotation doesn't have a 'value()' method and therefore "Expand Annotation to Normal Form" fix couldn't be applied (IDEA-158456, IDEA-157727)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Add 'type='" "true"
|
||||
class T {
|
||||
@interface A {
|
||||
String[] type();
|
||||
}
|
||||
|
||||
@A(type = "t")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Add 'name='" "true"
|
||||
class T {
|
||||
@interface A {
|
||||
int size();
|
||||
String name();
|
||||
}
|
||||
|
||||
@A(name = "a")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Add 'type='" "true"
|
||||
class T {
|
||||
@interface A {
|
||||
String name();
|
||||
String type();
|
||||
}
|
||||
|
||||
@A(type = "a", name = "b")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Add 'type='" "true"
|
||||
class T {
|
||||
@interface A {
|
||||
String[] type();
|
||||
}
|
||||
|
||||
@A(<caret>"t")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Add 'name='" "true"
|
||||
class T {
|
||||
@interface A {
|
||||
int size();
|
||||
String name();
|
||||
}
|
||||
|
||||
@A(<caret>"a")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Add 'type='" "true"
|
||||
class T {
|
||||
@interface A {
|
||||
String name();
|
||||
String type();
|
||||
}
|
||||
|
||||
@A(<caret>"a", name = "b")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Add 'name='" "false"
|
||||
class T {
|
||||
@interface A {
|
||||
String name();
|
||||
String type();
|
||||
}
|
||||
|
||||
@A(<caret>"a", name = "b")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Add 'type='" "false"
|
||||
class T {
|
||||
@interface A {
|
||||
String[] type();
|
||||
}
|
||||
|
||||
@A(<caret>42)
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Add 'size='" "false"
|
||||
class T {
|
||||
@interface A {
|
||||
int size();
|
||||
}
|
||||
|
||||
@A(<caret>"a")
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user