Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/compactToCanonical/afterAnnotations.java
Tagir Valeev b936699772 IDEA-229842 Convert compact constructor to canonical
GitOrigin-RevId: 6edd200e51ec300bf1068d2f040b837fea3f6e1f
2020-01-21 11:08:24 +00:00

23 lines
585 B
Java

// "Convert compact constructor to canonical" "true"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
public record Test(int x, @ParamAnno int y, @FieldAnno int... other) {
@ConstructorAnno
public Test(int x, @ParamAnno int y, int... other) {
this.x = Math.abs(x);
if (other == null) other = new int[0];
this.y = y;
this.other = other;
}
}
@Target(ElementType.PARAMETER)
@interface ParamAnno {}
@Target(ElementType.FIELD)
@interface FieldAnno {}
@Target(ElementType.CONSTRUCTOR)
@interface ConstructorAnno {}