sampla Posted May 4, 2016 Share Posted May 4, 2016 It's not alphabetic. What determines the order of the accounts in the selector? Quote Link to comment Share on other sites More sharing options...
Vilius Posted May 4, 2016 Share Posted May 4, 2016 I think its the order you add accounts to it. Quote Link to comment Share on other sites More sharing options...
Mikasa Posted May 4, 2016 Share Posted May 4, 2016 I think its the order you add accounts to it. i'd assume this as well 1 Quote Link to comment Share on other sites More sharing options...
Alek Posted May 4, 2016 Share Posted May 4, 2016 The order you add it, not adding sorting. 1 Quote Link to comment Share on other sites More sharing options...
sampla Posted May 4, 2016 Author Share Posted May 4, 2016 (edited) I think its the order you add accounts to it. The order you add it, not adding sorting. Not for me, it's not. I just tried adding an account again to see where it was placed and it was placed 2nd from the top. Made another one and it was placed 5th. I don't get it. Both email addresses started with the same first letter. Edited May 4, 2016 by sampla Quote Link to comment Share on other sites More sharing options...
EndureCoreNas Posted May 5, 2016 Share Posted May 5, 2016 Yeah mine aren't added by the order I add them in either. I wondered this as well, but never asked haha. Quote Link to comment Share on other sites More sharing options...
DragonAlpha Posted May 5, 2016 Share Posted May 5, 2016 (edited) Yeah mine aren't added by the order I add them in either. I wondered this as well, but never asked haha. They're stored in a non-linked hashmap. So the JVM can juggle the order around seemingly randomly when new accounts are added to your database, or existing accounts are removed from the hashmap database. If it were a linked hash map, it would be the exact order you add them in. The JVM does low level optimizations and memory management when deciding where to insert them. It's based on your current RAM state, and other factors. Edited May 5, 2016 by DragonAlpha Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2016 Share Posted May 5, 2016 (edited) The JVM does low level optimizations and memory management when deciding where to insert them. It's based on your current RAM state, and other factors. Don't think so Edited May 5, 2016 by Botre Quote Link to comment Share on other sites More sharing options...
DragonAlpha Posted May 5, 2016 Share Posted May 5, 2016 Lol no. A plain Entry array, nothing fancy going on. I guess the entries get reordered by magic then. Quote Link to comment Share on other sites More sharing options...
sampla Posted May 5, 2016 Author Share Posted May 5, 2016 I'd love to have this fixed. Quality of life update. Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2016 Share Posted May 5, 2016 (edited) I guess the entries get reordered by magic then. Edit: no Edited May 5, 2016 by Botre Quote Link to comment Share on other sites More sharing options...
DragonAlpha Posted May 5, 2016 Share Posted May 5, 2016 (edited) -EDIT- Edited May 5, 2016 by DragonAlpha Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2016 Share Posted May 5, 2016 (edited) Valid point. Initial post reworded: So the accounts hashmap's iterator can juggle the order around seemingly randomly. The JVM does low level optimizations and memory management. It's based on your current RAM state, and other factors. Hello world Edited May 5, 2016 by Botre Quote Link to comment Share on other sites More sharing options...
DragonAlpha Posted May 5, 2016 Share Posted May 5, 2016 (edited) Tin A hasmap is used. A hashmap does not guarantee order. You referenced the Java doc's iterator as a reference where it says "Iterator does not guarantee order". Well the same documentation in the Hashmap section says the exact same thing for Hashmap. public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable Hash table based implementation of the Map interface. This implementation provides all of the optional map operations, and permits null values and the null key. (The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.) This class makes no guarantees as to the order of the map I can post source code from my decompiler too. Nothing fancy going on. Here is the Iterator: Here is the underlying consumer: Edited May 5, 2016 by DragonAlpha 1 Quote Link to comment Share on other sites More sharing options...
Czar Posted May 5, 2016 Share Posted May 5, 2016 (edited) edit: I'll post this in suggestions forum instead >.< Edited May 5, 2016 by Czar Quote Link to comment Share on other sites More sharing options...