mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
don't duplicate type use annotations during copy of modifier lists (inspired by IDEA-166062)
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target({ElementType.PARAMETER, ElementType.TYPE_USE})
|
||||
@interface Anno {
|
||||
String value() default "";
|
||||
}
|
||||
|
||||
class A {
|
||||
@Anno
|
||||
String methodA() {};
|
||||
}
|
||||
|
||||
class B {
|
||||
private A a;
|
||||
|
||||
|
||||
@Anno
|
||||
public String methodA() {
|
||||
return a.methodA();
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target({ElementType.PARAMETER, ElementType.TYPE_USE})
|
||||
@interface Anno {
|
||||
String value() default "";
|
||||
}
|
||||
|
||||
class A {
|
||||
@Anno
|
||||
String methodA() {};
|
||||
}
|
||||
|
||||
class B {
|
||||
private A a;
|
||||
|
||||
|
||||
<caret>
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user