Permalink
Browse files

endpoints - Provided test reproducing issue on annotation processing …

…when annotation provides default value
  • Loading branch information...
fcamblor committed Feb 10, 2018
1 parent d9f75ff commit 0745a78051426bcf3e2fcb5dac4ced14b4dda845
@@ -4,37 +4,40 @@
// (https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.6.1)
public @interface MyAnnotation {
// primitive types
byte aByte();
short aShort();
int anInt();
long aLong();
float aFloat();
double aDouble();
boolean aBool();
char aChar();
byte aByte() default 121;
short aShort() default 321;
int anInt() default 321;
long aLong() default 321;
float aFloat() default 564.321f;
double aDouble() default 564.321;
boolean aBool() default false;
char aChar() default 'B';
// Complex types
String aString();
Class aClass();
Class<? extends Number> aParameterizedTypeClass();
MyEnum anEnum();
String aString() default "BBB";
Class aClass() default String.class;
Class<? extends Number> aParameterizedTypeClass() default Integer.class;
MyEnum anEnum() default MyEnum.B;
// Another annotation
MyNestedAnnotation anAnnotation();
MyNestedAnnotation anAnnotation() default @MyNestedAnnotation({ "AAA" });
byte[] severalBytes();
short[] severalShorts();
int[] severalInts();
long[] severalLongs();
float[] severalFloats();
double[] severalDoubles();
boolean[] severalBools();
char[] severalChars();
byte[] severalBytes() default { 121, 121 };
short[] severalShorts() default { 654, 321 };
int[] severalInts() default { 654, 321 };
long[] severalLongs() default { 654, 321 };
float[] severalFloats() default { 654.321f, 123.456f};
double[] severalDoubles() default { 654.321, 123.456};
boolean[] severalBools() default { false, true };
char[] severalChars() default { 'C', 'B', 'A' };
String[] severalStrings();
Class[] severalClasses();
Class<? extends Number>[] severalParameterizedTypeClasses();
MyEnum[] severalEnums();
String[] severalStrings() default { "CCC", "BBB", "AAA" };
Class[] severalClasses() default { String.class, Integer.class };
Class<? extends Number>[] severalParameterizedTypeClasses() default { Integer.class, Long.class, Double.class };
MyEnum[] severalEnums() default { MyEnum.B, MyEnum.A };
MyNestedAnnotation[] severalAnnotations();
MyNestedAnnotation[] severalAnnotations() default {
@MyNestedAnnotation(value={ "AAA", "CCC" }),
@MyNestedAnnotation(value={ "BBB", "DDD" })
};
}
@@ -103,4 +103,10 @@ public String deleteHello(String who) {
public String testingAnnotations() {
return "hello blah";
}
@GET("/testingAnnotationsWithDefaultValues")
@MyAnnotation
public String testingAnnotationsWithDefaultValues() {
return "hello blah";
}
}

0 comments on commit 0745a78

Please sign in to comment.