summaryrefslogtreecommitdiffstats
path: root/libdvm
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-11-21 18:17:34 -0800
committerBrian Carlstrom <bdc@google.com>2013-11-21 18:17:34 -0800
commit00a8f245f5c91b1a61bf5ca3ca690c52496c8731 (patch)
treedd52fda47372aaaf64ad76885f547544a09527aa /libdvm
parenteaa0add6aaa503221a530d346a3b4a066bc46449 (diff)
parent5af4cc5a4e2917f8b3528882a444f93f5838c952 (diff)
downloadlibcore-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.java11
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);
}
/**