reflections
reflections copied to clipboard
Method getTypesAnnotatedWith() throws StackOverflowError
Might be related to #137. Reproduced if annotation annotates itself (like here).
Example:
public static void main(String[] args) {
Reflections reflections = new Reflections("");
// this works just fine
reflections.getTypesAnnotatedWith(Deprecated.class);
// "recursive annotation" throws StackOverflowError in 0.9.10 (worked in 0.9.8)
reflections.getTypesAnnotatedWith(MyDeprecated.class);
}
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(value={CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})
@MyDeprecated
public @interface MyDeprecated {
}