Skip to content

Instantly share code, notes, and snippets.

@Sparky983
Last active October 29, 2022 16:32
Show Gist options
  • Save Sparky983/c64f08163e47b2e588c322798e135afe to your computer and use it in GitHub Desktop.
Save Sparky983/c64f08163e47b2e588c322798e135afe to your computer and use it in GitHub Desktop.
is suppose to return `Annotation[]{@deprecated}` but throws an index out of bounds exception
public class Main {
public static void main(String[] args) {
new Main().main();
}
public void main() {
class LocalClass {
LocalClass(@Deprecated String s) {}
}
LocalClass.class.getDeclaredConstructors()[0].getParameters()[1].getDeclaredAnnotations();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment