RFR 7183985: Class.getAnnotation() throws an ArrayStoreException when the annotation class not present

Liam Miller-Cushon cushon at google.com
Thu Feb 22 23:20:41 UTC 2018


Hello,


Please consider this fix for JDK-7183985.


bug: https://bugs.openjdk.java.net/browse/JDK-7183985

webrev: http://cr.openjdk.java.net/~cushon/7183985/webrev.01/


I started a CSR for the change:
https://bugs.openjdk.java.net/browse/JDK-8198584

We have been using the fix at Google for about two years, and there has
been no compatibility impact. I found very few places ArrayStoreException
was being explicitly handled, and none that were depending on the current
behaviour of getAnnotation().


There was some previous discussion of the bug on core-libs-dev:

*
http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-April/040590.html

*
http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-October/021798.html


Thanks,

Liam


More information about the core-libs-dev mailing list