Issue 5560 in pharo: LinkedList at: index putLink: aLink

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5560 in pharo: LinkedList at: index putLink: aLink

pharo
Status: New
Owner: ----
Labels: Milestone-1.3 Type-Bug

New issue 5560 by [hidden email]: LinkedList at: index putLink: aLink
http://code.google.com/p/pharo/issues/detail?id=5560

This method starts with

at: index putLink: aLink
        | previousLink nextLink |
        "Please don't put a link which is already in the list, or you will create  
an infinite loop"
        (self validIndex: index)
                ifTrue: [^ self errorOutOfBounds].

I suggest that a test be added to detect this error, and then the ifTrue:  
should be changed to an ifFalse:


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5560 in pharo: LinkedList at: index putLink: aLink

pharo
Updates:
        Status: Accepted

Comment #1 on issue 5560 by [hidden email]: LinkedList at: index  
putLink: aLink
http://code.google.com/p/pharo/issues/detail?id=5560

This code is used by the scheduler all the time. So I would not touch it  
now.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5560 in pharo: LinkedList at: index putLink: aLink

pharo
In reply to this post by pharo

Comment #3 on issue 5560 by [hidden email]: LinkedList at: index  
putLink: aLink
http://code.google.com/p/pharo/issues/detail?id=5560

Clearly this code is _not_ used by the scheduler, because if it were, the  
scheduler would be broken, and nothing would run.

The whole idea of making LinkedList a general-purpose structure was  
probably bad.  Maybe the Scheduler should have it's own linked list of  
processes (a ProcessList ?), and the Collections hierarchy should get a  
general-purpose list  class?



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker