diff options
author | Brian Carlstrom <bdc@google.com> | 2013-11-21 18:17:34 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2013-11-21 18:17:34 -0800 |
commit | 00a8f245f5c91b1a61bf5ca3ca690c52496c8731 (patch) | |
tree | dd52fda47372aaaf64ad76885f547544a09527aa /libdvm | |
parent | eaa0add6aaa503221a530d346a3b4a066bc46449 (diff) | |
parent | 5af4cc5a4e2917f8b3528882a444f93f5838c952 (diff) | |
download | libcore-00a8f245f5c91b1a61bf5ca3ca690c52496c8731.zip libcore-00a8f245f5c91b1a61bf5ca3ca690c52496c8731.tar.gz libcore-00a8f245f5c91b1a61bf5ca3ca690c52496c8731.tar.bz2 |
resolved conflicts for merge of 5af4cc5a to klp-dev-plus-aosp
Change-Id: Id64c8048aab28487a7e311ed0f9b89b491d3c2ac
Diffstat (limited to 'libdvm')
-rw-r--r-- | libdvm/src/main/java/java/lang/Class.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libdvm/src/main/java/java/lang/Class.java b/libdvm/src/main/java/java/lang/Class.java index 4b36f3c..c825925 100644 --- a/libdvm/src/main/java/java/lang/Class.java +++ b/libdvm/src/main/java/java/lang/Class.java @@ -820,14 +820,19 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe * class}. */ public Type getGenericSuperclass() { - Type genericSuperclass = getSuperclass(); + Type superClass = getSuperclass(); + // This method is specified to return null for all cases where getSuperclass + // returns null, i.e, for primitives, interfaces, void and java.lang.Object. + if (superClass == null) { + return null; + } String annotationSignature = AnnotationAccess.getSignature(this); if (annotationSignature != null) { GenericSignatureParser parser = new GenericSignatureParser(getClassLoader()); parser.parseForClass(this, annotationSignature); - genericSuperclass = parser.superclassType; + superClass = parser.superclassType; } - return Types.getType(genericSuperclass); + return Types.getType(superClass); } /** |