From ca83def598b81c4c59bd00dd1f706503b6e6a5d7 Mon Sep 17 00:00:00 2001 From: Javier Castro Date: Wed, 3 Oct 2012 18:09:17 -0300 Subject: [PATCH] Fix bug matching ambiguous method when an overload has a params (IndexOutOfRangeException) --- src/Spring/Spring.Core/Util/ReflectionUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spring/Spring.Core/Util/ReflectionUtils.cs b/src/Spring/Spring.Core/Util/ReflectionUtils.cs index a10f64bd..9027f7d3 100644 --- a/src/Spring/Spring.Core/Util/ReflectionUtils.cs +++ b/src/Spring/Spring.Core/Util/ReflectionUtils.cs @@ -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,