--- old/src/share/classes/java/lang/Class.java 2013-08-21 13:54:07.649948870 +0200 +++ new/src/share/classes/java/lang/Class.java 2013-08-21 13:54:07.481948861 +0200 @@ -3338,8 +3338,16 @@ * @since 1.8 */ public AnnotatedType getAnnotatedSuperclass() { - return TypeAnnotationParser.buildAnnotatedSuperclass(getRawTypeAnnotations(), getConstantPool(), this); -} + if (this == Object.class || + isInterface() || + isArray() || + isPrimitive() || + this == Void.TYPE) { + return null; + } + + return TypeAnnotationParser.buildAnnotatedSuperclass(getRawTypeAnnotations(), getConstantPool(), this); + } /** * Returns an array of AnnotatedType objects that represent the use of types to