BuilderStrategy Bug

Topics: CAB & Smart Client Software Factory
Feb 9, 2006 at 11:30 PM
originally posted by: mamu300B

Need more code?
Any comments on my findings?

-Matthias
Feb 9, 2006 at 11:31 PM
originally posted by: mamu300B

Hi all

I found the following bug (don't know if it's already known to you) in the BuilderStrategy.ParametersToTypeList() method:

This method has the following code:

protected string ParametersToTypeList(params object[] parameters)
{
List<string> types = new List<string>();

foreach (object parameter in parameters)
types.Add(parameter.GetType().Name);

return string.Join(", ", types.ToArray());
}

Which will throw an object null reference exception for any parameter beeing null.
And this is the case if you specify that a ServiceDependency is not required like it's done with:
ServiceDependency(Required = false)

This ParametersToTypeList() method gets used in the CreationStrategy and MethodExecutionStrategy.

Regards
-Matthias
Feb 10, 2006 at 10:47 AM
originally posted by: BradWilsonMSFT

Sorry, I haven't had time yet to reproduce, but it certainly seems like it might be a bug.