--- a/jdk/src/share/classes/java/lang/Class.java Sun Aug 25 23:20:59 2013 +0400
+++ b/jdk/src/share/classes/java/lang/Class.java Mon Aug 26 13:38:14 2013 +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