diff --git a/build.xml b/build.xml index c4f5eec43..5903fe4f7 100644 --- a/build.xml +++ b/build.xml @@ -676,7 +676,7 @@ + value="file:${lib}/felix.unit.test.properties"/> + value="${lib}/logging.properties"/> diff --git a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java index 13954f113..434827ef9 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java +++ b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java @@ -65,7 +65,7 @@ public class MclStorageManager private BundleContext bundleContext = null; /** - * The file acces service that we'll be using in order to obtain a reference + * The file access service that we'll be using in order to obtain a reference * to the contact list file. */ private FileAccessService faService = null; @@ -98,7 +98,7 @@ public class MclStorageManager private FailSafeTransaction contactlistTrans = null; /** - * A regerence to the MetaContactListServiceImpl that created and started us. + * A reference to the MetaContactListServiceImpl that created and started us. */ private MetaContactListServiceImpl mclServiceImpl = null; @@ -209,7 +209,7 @@ public class MclStorageManager * other words that it has successfully found and read the xml contact list * file. * - * @return true if the storage manager has been successfully initialialized + * @return true if the storage manager has been successfully initialized * and false otherwise. */ boolean isStarted() @@ -239,7 +239,7 @@ public void stop () * @param mclServiceImpl a reference to the currently valid instance of the * MetaContactListServiceImpl that we could use to pass parsed * contacts and contact groups. - * @throws IOException if the contact lsit file specified file does not + * @throws IOException if the contact list file specified file does not * exist and could not be created. * @throws XMLException if there is a problem with the file syntax. */ @@ -344,10 +344,10 @@ void start(BundleContext bc, logger.error("Error finding configuration for default parsers", ex); } - this.launchStorageThread(); mclServiceImpl.addMetaContactListListener(this); this.mclServiceImpl = mclServiceImpl; started = true; + this.launchStorageThread(); } /** @@ -545,11 +545,11 @@ private void initVirginDocument(MetaContactListServiceImpl mclServiceImpl, * file and calls corresponding "add" methods * belonging to mclServiceImpl for every meta contact and meta * contact group stored in the (conteactlist.xml) file that correspond to a - * provider carying the specified accountID. + * provider caring the specified accountID. * * @param accountID the identifier of the account whose contacts we're * interested in. - * @throws XMLException if a problem occurs while parsing contact lsit + * @throws XMLException if a problem occurs while parsing contact list * contents. */ void extractContactsForAccount(String accountID) @@ -590,7 +590,7 @@ void extractContactsForAccount(String accountID) } /** - * Parses groupNode and all of its subnodes, createing + * Parses groupNode and all of its subnodes, creating * corresponding instances through mclServiceImpl as children of * parentGroup * @@ -598,7 +598,7 @@ void extractContactsForAccount(String accountID) * creating new contacts and groups. * @param accountID a String identifier of the account whose contacts we're * interested in. - * @param groupNode teh XML Element that points to the group we're + * @param groupNode the XML Element that points to the group we're * currently parsing. * @param parentGroup the MetaContactGroupImpl where we should be * creating children. @@ -839,11 +839,11 @@ private void processGroupXmlNode( * Returns all proto contacts that are encapsulated inside the meta contact * represented by metaContactNode and that originate from the * account with id - accountID. The returned list contains contact - * contact descriptors as elements. In case the meta cotnact does + * contact descriptors as elements. In case the meta contact does * not contain proto contacts originating from the specified account, an * empty list is returned. *

- * @param metaContactNode the Element whose proto contacts we'd likde to + * @param metaContactNode the Element whose proto contacts we'd like to * extract. * @param accountID the id of the account whose contacts we're interested in. * @param protoGroups a map binding proto group UIDs to protogroups, that @@ -1118,7 +1118,7 @@ public void metaContactAdded(MetaContactEvent evt) } catch (IOException ex){ /**given we're being invoked from an event dispatch thread that was - proberly triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after adding contact " + evt.getSourceMetaContact(), ex); @@ -1168,7 +1168,7 @@ public void metaContactGroupAdded(MetaContactGroupEvent evt) catch (IOException ex) { /**given we're being invoked from an event dispatch thread that was - proberly triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after adding contact " + evt.getSourceMetaContactGroup(), ex); @@ -1201,7 +1201,7 @@ public void metaContactGroupRemoved(MetaContactGroupEvent evt) } catch (IOException ex){ /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after removing group " + evt.getSourceMetaContactGroup(), ex); @@ -1251,7 +1251,7 @@ public void metaContactMoved(MetaContactMovedEvent evt) } catch (IOException ex){ /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after moving " + evt.getSourceMetaContact(), ex); @@ -1333,7 +1333,7 @@ public void metaContactRemoved(MetaContactEvent evt) } catch (IOException ex){ /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after removing " + evt.getSourceMetaContact(), ex); @@ -1371,7 +1371,7 @@ public void metaContactRenamed(MetaContactRenamedEvent evt) } catch (IOException ex){ /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after rename of " + evt.getSourceMetaContact(), ex); @@ -1412,7 +1412,7 @@ public void protoContactRemoved(ProtoContactEvent evt) catch (IOException ex) { /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after removing proto contact " + evt.getProtoContact(), ex); @@ -1422,7 +1422,7 @@ public void protoContactRemoved(ProtoContactEvent evt) /** * We simply ignore - we're not interested in this kind of events. - * @param evt the MetaContactGroupEvent containind details of this + * @param evt the MetaContactGroupEvent containing details of this * event. */ public void childContactsReordered(MetaContactGroupEvent evt) @@ -1475,7 +1475,7 @@ public void metaContactGroupModified(MetaContactGroupEvent evt) catch (IOException ex) { /**given we're being invoked from an event dispatch thread - * that was proberly triggerred by a net operation - we + * that was probably triggered by a net operation - we * could not do much. so ... log and @todo one day we'll * have a global error dispatcher */ logger.error("Writing CL failed after adding contact " @@ -1499,7 +1499,7 @@ public void metaContactGroupModified(MetaContactGroupEvent evt) catch (IOException ex) { /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after removing proto group " + evt.getSourceProtoGroup().getGroupName(), ex); @@ -1538,7 +1538,7 @@ public void protoContactAdded(ProtoContactEvent evt) catch (IOException ex) { /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after adding proto contact " + evt.getProtoContact(), ex); @@ -1593,7 +1593,7 @@ public void protoContactMoved(ProtoContactEvent evt) catch (IOException ex) { /**given we're being invoked from an event dispatch thread that was - probably triggerred by a net operation - we could not do much. + probably triggered by a net operation - we could not do much. so ... log and @todo one day we'll have a global error dispatcher */ logger.error("Writing CL failed after moving proto contact " + evt.getProtoContact(), ex); diff --git a/test/net/java/sip/communicator/slick/contactlist/TestMetaContactListPersistence.java b/test/net/java/sip/communicator/slick/contactlist/TestMetaContactListPersistence.java index 5d5395260..a3b75d71f 100644 --- a/test/net/java/sip/communicator/slick/contactlist/TestMetaContactListPersistence.java +++ b/test/net/java/sip/communicator/slick/contactlist/TestMetaContactListPersistence.java @@ -71,7 +71,7 @@ public static Test suite() /** * In this test we only create a meta contact and move it somewhere else. * This is a delicate operation since any underlying storage method would - * have to not only move the meta contact itslef but also make sure that all + * have to not only move the meta contact itself but also make sure that all * proto contacts have been moved to protogroups accordingly. We don't do * any real testing inside this method. The testing would be happening * during reload and it would fail if the contacts moved in this method @@ -112,6 +112,12 @@ public void testCreateAndMoveMetaContact() public void testReloadMetaContactListBundle() throws Exception { + Object o = new Object(); + synchronized(o){ + // wait other operations to finish before reloading + o.wait(1000); + } + Bundle metaClBundle = findMetaClBundle(); //uninstall the meta contact list service @@ -217,7 +223,7 @@ public void testPartialContactListRestauration() } /** - * Register the remaing protocol providers and make sure that they too are + * Register the remaining protocol providers and make sure that they too are * properly loaded inside the contact list. We also need to verify that * proto contacts that have been merged in a single meta contact are still * merged.