Should I open an issue for this? On the question of using the other order guarantee, I guess this depends on how reliably that is actually implemented in the browsers :)
-- Andreas On Mon, Jan 6, 2014 at 1:16 PM, Jens <[email protected]> wrote: > Looks like you are right and the iterator does not account for such a > behavior in case of remove(). If remove() can really result in a different > key ordering then iteration can fail to work properly. Adding an element to > the underlying collection while iterating is not an issue as the Iterator > JavaDoc/Contract already defines that iteration behavior is undefined if > the underlying collection is modified by other means than Iterator.remove(). > > I think GWT has been lucky here so far and browsers do not re-order > existing storage entries if you remove a key/value pair. Also the key(n) > doc says: > > The supported property names on a > Storage<http://dev.w3.org/html5/webstorage/#storage-0>object are the keys of > each key/value pair currently present in the list > associated with the object, *in the order that the keys were last added > to the storage area*. > > I am wondering if this can be useful for an alternative iterator > implementation as this sentence defines an ordering which should not change > when removing items. > > > -- J. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Google Web Toolkit" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-web-toolkit/b6SLntTyTsU/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
