Issue 5 in backlinq: Enumerable.FirstOrDefault throws wrong exception type for null-predicate argument

0 views
Skip to first unread message

codesite...@google.com

unread,
Sep 5, 2008, 7:02:49 AM9/5/08
to backlin...@googlegroups.com
Issue 5: Enumerable.FirstOrDefault throws wrong exception type for
null-predicate argument
http://code.google.com/p/backlinq/issues/detail?id=5

New issue report by dominik....@skybow.com:
What steps will reproduce the problem?

var enumerable = new int[] {3, 5, 7};
enumerable.FirstOrDefault(null);

What is the expected output? What do you see instead?

Expected: According to MSDN ArgumentNullException
Instead: NullReferenceException

What version of the product are you using? On what operating system?

BackLinq 0.6.0.0
Windows Vista

Additional information:

System.NullReferenceException: Object reference not set to an instance of
an object.
at System.Linq.Enumerable.<>c__DisplayClass25`1.<Where>b__24(TSource item,
Int32 i) in Enumerable.cs: line 133
at System.Linq.Enumerable.<Where>d__27`1.MoveNext() in Enumerable.cs: line
150
at System.Linq.Enumerable.FirstImpl<TSource>(IEnumerable`1 source, Func`1
empty) in Enumerable.cs: line 300
at System.Linq.Enumerable.FirstOrDefault<TSource>(IEnumerable`1 source) in
Enumerable.cs: line 332
at System.Linq.Enumerable.FirstOrDefault<TSource>(IEnumerable`1 source,
Func`2 predicate) in Enumerable.cs: line 344
at
BackLinq.Tests.EnumerableFixture.FirstOrDefault_NullAsFunc_ArgumentNullExce
ptionIsThrown() in EnumerableFixture.cs: line 321


Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Sep 5, 2008, 7:06:51 AM9/5/08
to backlin...@googlegroups.com
Issue 5: Enumerable.FirstOrDefault throws wrong exception type for
null-predicate argument
http://code.google.com/p/backlinq/issues/detail?id=5

Comment #1 by azizatif:
(No comment was entered for this change.)


Issue attribute updates:
Status: Accepted
Labels: Component-Logic

codesite...@google.com

unread,
Sep 5, 2008, 1:53:59 PM9/5/08
to backlin...@googlegroups.com
Issue 5: Enumerable.FirstOrDefault throws wrong exception type for
null-predicate argument
http://code.google.com/p/backlinq/issues/detail?id=5

Comment #2 by azizatif:


(No comment was entered for this change.)


Issue attribute updates:
Owner: azizatif

codesite...@google.com

unread,
Sep 5, 2008, 1:58:02 PM9/5/08
to backlin...@googlegroups.com
Issue 5: Enumerable.FirstOrDefault throws wrong exception type for
null-predicate argument
http://code.google.com/p/backlinq/issues/detail?id=5

Comment #3 by azizatif:
Fixed in r104.


Issue attribute updates:
Status: Fixed

codesite...@google.com

unread,
Sep 5, 2008, 2:02:19 PM9/5/08
to backlin...@googlegroups.com
Issue 5: Enumerable.FirstOrDefault throws wrong exception type for
null-predicate argument
http://code.google.com/p/backlinq/issues/detail?id=5

Comment #4 by azizatif:
More related fixes in r105.

Reply all
Reply to author
Forward
0 new messages