Fix bug matching ambiguous method when an overload has a params (IndexOutOfRangeException)

This commit is contained in:
Javier Castro
2012-10-03 18:09:17 -03:00
parent eb59b8f26e
commit ca83def598

View File

@@ -418,7 +418,7 @@ namespace Spring.Util
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,