Revision: 1117 Author: limpbizkit Date: Mon Oct 12 15:58:31 2009 Log: Apply mcculls' patch for issue 437
http://code.google.com/p/google-guice/source/detail?r=1117 Modified: /trunk/src/com/google/inject/internal/MoreTypes.java /trunk/test/com/google/inject/AllTests.java ======================================= --- /trunk/src/com/google/inject/internal/MoreTypes.java Mon Sep 7 14:00:57 2009 +++ /trunk/src/com/google/inject/internal/MoreTypes.java Mon Oct 12 15:58:31 2009 @@ -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. ======================================= --- /trunk/test/com/google/inject/AllTests.java Mon Oct 12 09:17:34 2009 +++ /trunk/test/com/google/inject/AllTests.java Mon Oct 12 15:58:31 2009 @@ -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() { --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-guice-dev?hl=en -~----------~----~----~----~------~----~------~--~---
