Merge "Fix annotations test 004." into dalvik-dev
diff --git a/src/object.cc b/src/object.cc
index 281f685..174388a 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -378,6 +378,10 @@
 Class* Method::GetReturnType() const {
   DCHECK(GetDeclaringClass()->IsResolved() || GetDeclaringClass()->IsErroneous())
       << PrettyMethod(this);
+  Class* java_return_type = java_return_type_;
+  if (java_return_type != NULL) {
+      return java_return_type;
+  }
   // Short-cut
   Class* result = GetDexCacheResolvedTypes()->Get(GetReturnTypeIdx());
   if (result == NULL) {
diff --git a/test/004-annotations/expected.txt b/test/004-annotations/expected.txt
index 8f19c4c..eade6de 100644
--- a/test/004-annotations/expected.txt
+++ b/test/004-annotations/expected.txt
@@ -28,10 +28,10 @@
     @android.test.anno.AnnoSimpleMethod()
       interface android.test.anno.AnnoSimpleMethod
     method parameter annotations:
-  annotations on FIELD public static int android.test.anno.SimplyNoted.mOneFoo:
+  annotations on FIELD public int android.test.anno.SimplyNoted.mFoo:
     @android.test.anno.AnnoSimpleField()
       interface android.test.anno.AnnoSimpleField
-  annotations on FIELD public int android.test.anno.SimplyNoted.mFoo:
+  annotations on FIELD public static int android.test.anno.SimplyNoted.mOneFoo:
     @android.test.anno.AnnoSimpleField()
       interface android.test.anno.AnnoSimpleField