On 22/02/2018 23:20, Liam Miller-Cushon wrote:

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:

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:

Yes, this one comes up every few years. I'm hoping Joe Darcy will reply to your review with any background or issues from when this came up in the past. From a distance then retrofitting AnnotatedElement getXXX methods to throw TypeNotPresentException seems reasonable, I'm less sure about the isAnnotationPresent method as it might be surprising for that to fail.


Reply via email to