AbstractQueryImpl accepts IEnumerables in SetParameterList but breaks if they're not ICollections

Description

Commit a0e99941fe582467563ff6118b555d4ac2e55e2f changed the signatures of the two IQuery.SetParameterList methods, and correspondingly changed the signatures of AbstractQueryImpl.SetParameterList to allow passing an IEnumerable.

However, it didn't change the code which uses that value. The first line of AbstractQueryImpl.ExpandParameterList (line 240 in the current trunk) is

var vals = (ICollection)typedList.Value;

This cast fails if the IEnumerable passed in wasn't an ICollection - e.g. if it was created by a Linq Select<T, U>(Func<T, U>).

Environment

None

Activity

Show:

Alex Zaytsev June 8, 2012 at 2:58 PM

Fix commited to master 52c5b2a9e7fdfcfb03357700d38968a6b3da35de

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created November 28, 2011 at 12:56 PM
Updated September 21, 2014 at 12:40 PM
Resolved June 8, 2012 at 2:58 PM
Who's Looking?