SCM

[#1010839] NpgsqlParameterCollection eternal recursion (.Remove)

View Trackers | Bugs | Download .csv | Monitor

Date:
2010-06-07 14:49
Priority:
3
State:
Open
Submitted by:
Mikko V (pandha)
Assigned to:
Nobody (None)
Npgsql Version:
2.0.9
Category:
Group:
Resolution:
None
Summary:
NpgsqlParameterCollection eternal recursion (.Remove)

Detailed description
Calling this function ends in a stack overflow:

NpgsqlParameterCollection.cs, line 560:
public bool Remove(NpgsqlParameter item)
{
return Remove(item);
}

Whereas the other version of the function works:
public override void Remove(object value)

I suppose the upper (NpgsqlParameter-typed) method should call the non-typed method or something similar, I temporarily fixed my code by always casting the parameter to object:
updateCmd.Parameters.Remove( (Object) paramToRemove );

I didn't test it, but from the code it looks like the .Add method of the same class also has the same bug:

void ICollection<NpgsqlParameter>.Add(NpgsqlParameter item)
{
Add(item);
}

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge