diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java index c17ec9b8c..65dbbda0f 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java @@ -505,20 +505,7 @@ public MetaContactGroupImpl findMetaContactGroupByContactGroup( public MetaContact getMetaContact(int index) throws IndexOutOfBoundsException { - int i = 0; - - Iterator childrenIter = getChildContacts(); - - while (childrenIter.hasNext()) - { - MetaContact result = (MetaContact) childrenIter.next(); - if (i++ == index) - return result; - } - //if we got here then index was out of the bounds - throw new IndexOutOfBoundsException(i - + " is larger than size()=" - + childContacts.size()); + return (MetaContactImpl)this.childContactsOrderedCopy.get(index); } /**