RFR: JDK-8206325: AssertionError in TypeSymbol.getAnnotationTypeMetadata

Srikanth srikanth.adayapalam at oracle.com
Thu Nov 29 05:13:29 UTC 2018


Please review the proposed fix for


posted at:


Basically various parts of the compiler are ill prepared to handle the 
scenario where a non-annotation type is treated erroneously as an 
annotation. The present fix does two things: (a) "drops" the bogus 
annotation (after suitable errors have been reported) rather than 
persist in symbols. (b) since (a) is not enough to avoid trouble in all 
cases, proactive checks to avoid tripping the land mines are also put in 

In the normal course of things, this crash would never be reported to 
users, since the compiler "swallows" crashes when an error has already 
been reported - except when annotation processing is on (or when -XDdev 
is used)


More information about the compiler-dev mailing list