Apply mcculls' patch for issue 437


git-svn-id: https://google-guice.googlecode.com/svn/trunk@1117 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/src/com/google/inject/internal/MoreTypes.java b/src/com/google/inject/internal/MoreTypes.java
index 6a0efb0..ffef4f3 100644
--- a/src/com/google/inject/internal/MoreTypes.java
+++ b/src/com/google/inject/internal/MoreTypes.java
@@ -24,6 +24,7 @@
 import com.google.inject.spi.Message;
 import com.google.inject.util.Types;
 import java.io.Serializable;
+import java.lang.reflect.Array;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.GenericArrayType;
@@ -165,8 +166,8 @@
       return (Class<?>) rawType;
 
     } else if (type instanceof GenericArrayType) {
-      // TODO: Is this sufficient?
-      return Object[].class;
+      Type componentType = ((GenericArrayType)type).getGenericComponentType();
+      return Array.newInstance(getRawType(componentType), 0).getClass();
 
     } else if (type instanceof TypeVariable) {
       // we could use the variable's bounds, but that'll won't work if there are multiple.
diff --git a/test/com/google/inject/AllTests.java b/test/com/google/inject/AllTests.java
index 5f1938f..38638ad 100644
--- a/test/com/google/inject/AllTests.java
+++ b/test/com/google/inject/AllTests.java
@@ -51,7 +51,8 @@
 
   private static final Set<String> SUPPRESSED_TEST_NAMES = ImmutableSet.of(
       "testUnscopedProviderWorksOutsideOfRequestedScope(" + ScopesTest.class.getName() + ")",
-      "testCannotConvertUnannotatedBindings(" + TypeConversionTest.class.getName() + ")"
+      "testCannotConvertUnannotatedBindings(" + TypeConversionTest.class.getName() + ")",
+      "testCircularJitBindingsLeaveNoResidue(" + ImplicitBindingTest.class.getName() + ")"
   );
 
   public static Test suite() {