You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 2 ways to annotate an element with an array parameter:
@AnnotArray({ RuntimeException.class })
public void testValueWithArray() ;
@AnnotArray(RuntimeException.class)
public void testValueWithoutArray() ;
When I try to access to the annotation parameter with spoon with something like:
myCtMethod.getAnnotation(AnnotArray.class).value()
It work only with the first method example. The second fail with exception:
java.lang.ClassCastException: java.lang.Class cannot be cast to [Ljava.lang.Class;
at com.sun.proxy.$Proxy3.value(Unknown Source)
There are 2 ways to annotate an element with an array parameter:
@AnnotArray({ RuntimeException.class })
public void testValueWithArray() ;
@AnnotArray(RuntimeException.class)
public void testValueWithoutArray() ;
When I try to access to the annotation parameter with spoon with something like:
myCtMethod.getAnnotation(AnnotArray.class).value()
It work only with the first method example. The second fail with exception:
java.lang.ClassCastException: java.lang.Class cannot be cast to [Ljava.lang.Class;
at com.sun.proxy.$Proxy3.value(Unknown Source)
I've write a test that surround this bug:
https://github.com/petitpre/spoon/blob/bugValues/src/test/java/spoon/test/annotation/AnnotationTest.java#L345
The text was updated successfully, but these errors were encountered: