PDA

View Full Version : Using Spring.Collection LinkedList as NET2.0 LinkedList


D_Guidi
06-21-2005, 10:48 PM
Hello to all.
For my project i should use a LinkedList, and developing with VS2005 i have used Generic LinkedList<T>.

My code seems similar to
LinkedList<T> list = new LinkedList<T>;
list.addlast(someObject);
while (nodeQueue.Count != 0)
{
object o = list.First;
list.RemoveFirst;
// Some work
if(condition)
list.addlast(someOtherObject);
}

Using Spring.Collections.LinkedList instead of FW2.0 GenericLinkedList, i have written this code:
LinkedList list = new LinkedList;
list.add(someObject);
while (nodeQueue.Count != 0)
{
object o = list[0];
list.RemoveAt(0);
// Some work
if(condition)
list.add(someOtherObject);
}

But i have found an error (maybe a bug?):
when condition == true, list.Count is correctly 1 (otherwise is 0 because i insert only one object and i remove immediately the object ) but, when i call list[0] the second time, the object returned is null!
I have checked the code, and the property Value for the Nde returned is null... some suggestions?
I could post entire souce code if someone is interested.
Thanks for interest.

Mark Pollack
08-20-2005, 04:45 PM
Hi,

A point release (1.1) will address 2.0 support. I've made a link back to this page on jira (http://opensource.atlassian.com/projects/spring/browse/SPRNET-131) so we don't forget to make sure your issue is resolved. Hang in there... sorry for the long delay in replying

Cheers,
Mark