Permalink
Browse files

Fix bug matching ambiguous method when an overload has a params (Inde…

…xOutOfRangeException)
  • Loading branch information...
1 parent eb59b8f commit ca83def598b81c4c59bd00dd1f706503b6e6a5d7 @jacargentina jacargentina committed Oct 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Spring/Spring.Core/Util/ReflectionUtils.cs
@@ -418,7 +418,7 @@ public static MethodInfo GetGenericMethod(Type type, string methodName, Type[] t
if (parameters.Length > 0)
{
ParameterInfo lastParameter = parameters[parameters.Length - 1];
- if (lastParameter.GetCustomAttributes(typeof(ParamArrayAttribute), false).Length > 0)
+ if (lastParameter.GetCustomAttributes(typeof(ParamArrayAttribute), false).Length > 0 && argValues.Length >= parameters.Length)
{
paramValues =
PackageParamArray(argValues, parameters.Length,

0 comments on commit ca83def

Please sign in to comment.