Give proxy all of the return types. Part 2.

Change-Id: I953144290307f46824642837530ac4deeb6a78b2
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 44ca80c..8638b30 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1632,7 +1632,7 @@
   // Create constructor for Proxy that must initialize h
   Class* proxy_class = GetClassRoot(kJavaLangReflectProxy);
   ObjectArray<Method>* proxy_direct_methods = proxy_class->GetDirectMethods();
-  CHECK_EQ(proxy_direct_methods->GetLength(), 12);
+  CHECK_EQ(proxy_direct_methods->GetLength(), 15);
   Method* proxy_constructor = proxy_direct_methods->Get(2);
   // Clone the existing constructor of Proxy (our constructor would just invoke it so steal its
   // code_ too)
diff --git a/test/044-proxy/expected.txt b/test/044-proxy/expected.txt
index 27771ce..ddda58b 100644
--- a/test/044-proxy/expected.txt
+++ b/test/044-proxy/expected.txt
@@ -49,10 +49,9 @@
  (no args)
 Got expected ie
 
-Proxy methods: [public final java.lang.String $Proxy1.blob(), public final double $Proxy1.blue(int), public final R0a $Proxy1.checkMe(), public final R0base $Proxy1.checkMe(), public final R0aa $Proxy1.checkMe(), public final void $Proxy1.circle(int), public final boolean $Proxy1.equals(java.lang.Object), public final int $Proxy1.green(double), public final int $Proxy1.hashCode(), public final int $Proxy1.mauve(java.lang.String), public final int $Proxy1.rectangle(int,int), public final int $Proxy1.red(float), public final int $Proxy1.square(int,int), public final java.lang.String $Proxy1.toString(), public final int $Proxy1.trapezoid(int,double,int), public final void $Proxy1.upCheck() throws java.lang.InterruptedException, public final void $Proxy1.upChuck()]
+Proxy methods: [public final java.lang.String $Proxy1.blob(), public final double $Proxy1.blue(int), public final R0a $Proxy1.checkMe(), public final R0aa $Proxy1.checkMe(), public final R0base $Proxy1.checkMe(), public final void $Proxy1.circle(int), public final boolean $Proxy1.equals(java.lang.Object), public final int $Proxy1.green(double), public final int $Proxy1.hashCode(), public final int $Proxy1.mauve(java.lang.String), public final int $Proxy1.rectangle(int,int), public final int $Proxy1.red(float), public final int $Proxy1.square(int,int), public final java.lang.String $Proxy1.toString(), public final int $Proxy1.trapezoid(int,double,int), public final void $Proxy1.upCheck() throws java.lang.InterruptedException, public final void $Proxy1.upChuck()]
 Decl annos: []
 Param annos (0) : []
-Proxy fields: [private static java.lang.reflect.Method $Proxy1.m0, private static java.lang.reflect.Method $Proxy1.m1, private static java.lang.reflect.Method $Proxy1.m10, private static java.lang.reflect.Method $Proxy1.m11, private static java.lang.reflect.Method $Proxy1.m12, private static java.lang.reflect.Method $Proxy1.m13, private static java.lang.reflect.Method $Proxy1.m14, private static java.lang.reflect.Method $Proxy1.m15, private static java.lang.reflect.Method $Proxy1.m16, private static java.lang.reflect.Method $Proxy1.m2, private static java.lang.reflect.Method $Proxy1.m3, private static java.lang.reflect.Method $Proxy1.m4, private static java.lang.reflect.Method $Proxy1.m5, private static java.lang.reflect.Method $Proxy1.m6, private static java.lang.reflect.Method $Proxy1.m7, private static java.lang.reflect.Method $Proxy1.m8, private static java.lang.reflect.Method $Proxy1.m9]
 Dupe threw expected exception
 Clash threw expected exception
 Clash2 threw expected exception
diff --git a/test/044-proxy/src/BasicTest.java b/test/044-proxy/src/BasicTest.java
index fa1896f..8f4d19e 100644
--- a/test/044-proxy/src/BasicTest.java
+++ b/test/044-proxy/src/BasicTest.java
@@ -73,7 +73,11 @@
         Method[] methods = proxy.getClass().getDeclaredMethods();
         Arrays.sort(methods, new Comparator<Method>() {
           public int compare(Method o1, Method o2) {
-            return o1.getName().compareTo(o2.getName());
+            int result = o1.getName().compareTo(o2.getName());
+            if (result != 0) {
+                return result;
+            }
+            return o1.getReturnType().getName().compareTo(o2.getReturnType().getName());
           }
         });
         System.out.println("Proxy methods: " + Arrays.deepToString(methods));
@@ -82,13 +86,6 @@
         Annotation[][] paramAnnos = meth.getParameterAnnotations();
         System.out.println("Param annos (" + paramAnnos.length + ") : "
             + Arrays.deepToString(paramAnnos));
-        Field[] fields = proxy.getClass().getDeclaredFields();
-        Arrays.sort(fields, new Comparator<Field>() {
-          public int compare(Field o1, Field o2) {
-            return o1.getName().compareTo(o2.getName());
-          }
-        });
-        System.out.println("Proxy fields: " + Arrays.deepToString(fields));
     }
 
     static Object createProxy(Object proxyMe) {