Add special handling for GenericArrayType

This commit is contained in:
Oleg Zhurakousky
2020-10-27 14:36:33 +01:00
parent 54d65c1c74
commit a7104e489e

View File

@@ -92,7 +92,7 @@ public final class FunctionTypeUtils {
if (isMessage(type)) { if (isMessage(type)) {
type = getImmediateGenericType(type, 0); type = getImmediateGenericType(type, 0);
} }
return TypeResolver.reify(type); return TypeResolver.reify(type instanceof GenericArrayType ? type : TypeResolver.reify(type));
} }
/** /**
@@ -101,7 +101,8 @@ public final class FunctionTypeUtils {
* @return instance of {@link Class} as raw representation of the provided {@link Type} * @return instance of {@link Class} as raw representation of the provided {@link Type}
*/ */
public static Class<?> getRawType(Type type) { public static Class<?> getRawType(Type type) {
return type != null ? TypeResolver.resolveRawClass(TypeResolver.reify(type), null) : null; return type != null ? TypeResolver
.resolveRawClass(type instanceof GenericArrayType ? type : TypeResolver.reify(type), null) : null;
} }
/** /**