[sip-comm-dev] Re: svn commit: r5183


#1

Hey Werner,

I was wondering if you could shed some light on your latest commit.

I did see a few null checks that definitely make sense but am a bit
perplexed by the numerous name changes like for example:
bundleContext -> bContext; properties -> props; serviceimpl -> servimpl;
contactList -> contactLst; contactListDocument -> contactListDoc;
groupName -> grpname; protoGroups -> protGroups; groupUID -> grpUID;
parentGroup -> parentGrp; evt -> event

and my personal favorite "groupName -> grpName1" :slight_smile:

Was there any reason behind this that I am missing?

Cheers
Emil

wernerd@dev.java.net wrote:

···

Author: wernerd
Date: 2009-03-28 13:47:19+0000
New Revision: 5183

Modified:
   trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java
   trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java
   trunk/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java
   trunk/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java
   trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java
   trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
   trunk/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java
   trunk/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java
   trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java
   trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java
   trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java
   trunk/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java
   trunk/src/net/java/sip/communicator/impl/gui/GuiActivator.java
   trunk/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java
   trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java

Log:
Some code clean-up, remove warnings, no new functions or features.

Modified: trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java&p2=trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java (original)
+++ trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java 2009-03-28 13:47:19+0000
@@ -39,10 +39,10 @@
      *
      * @param bundleContext The execution context of the bundle being started.
      */
- public void start(BundleContext bundleContext) throws Exception
+ public void start(BundleContext bContext) throws Exception
     {
         try {
- AudioNotifierActivator.bundleContext = bundleContext;
+ AudioNotifierActivator.bundleContext = bContext;
             
             //Create the audio notifier service
             audioNotifier = new AudioNotifierServiceImpl();
@@ -85,7 +85,7 @@
      * listeners, unregister all services registered by the bundle, and
      * release all services used by the bundle.
      */
- public void stop(BundleContext bundleContext) throws Exception
+ public void stop(BundleContext bContext) throws Exception
     {
         //TODO: Stop all currently playing sounds here
         try {

Modified: trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java&p2=trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java 2009-03-28 13:47:19+0000
@@ -62,9 +62,6 @@
                 try
                 {
                     audioClip = new SCAudioClipImpl(url, this);
-
- if(audioClip == null)
- return null;
                 }
                 catch (Throwable e)
                 {

Modified: trunk/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java&p2=trunk/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java 2009-03-28 13:47:19+0000
@@ -377,7 +377,7 @@
                 callParticipantStates = getStates(value);
         }

- final int callParticipantCount = callParticipantIDs.size();
+ final int callParticipantCount = callParticipantIDs == null ? 0 : callParticipantIDs.size();
         for (int i = 0; i < callParticipantCount; i++)
         {
             CallParticipantRecordImpl cpr =
@@ -622,11 +622,11 @@
      *
      * @param historyService HistoryService
      */
- public void unsetHistoryService(HistoryService historyService)
+ public void unsetHistoryService(HistoryService hService)
     {
         synchronized (this.syncRoot_HistoryService)
         {
- if (this.historyService == historyService)
+ if (this.historyService == hService)
             {
                 this.historyService = null;

Modified: trunk/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java&p2=trunk/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java (original)
+++ trunk/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java 2009-03-28 13:47:19+0000
@@ -98,7 +98,7 @@
             propertyChangeChildren =
                 new Hashtable<String, ChangeEventDispatcher>();
         }
- ChangeEventDispatcher child = (ChangeEventDispatcher) propertyChangeChildren.get(
+ ChangeEventDispatcher child = propertyChangeChildren.get(
             propertyName);
         if (child == null)
         {
@@ -298,7 +298,7 @@
             }
         }

- if (vetoableChangeListeners != null)
+ if (vetoableChangeListeners != null && targets != null)
         {
             for (int i = 0; i < targets.length; i++)
             {

Modified: trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java&p2=trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java (original)
+++ trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java 2009-03-28 13:47:19+0000
@@ -32,11 +32,11 @@
      * framework.
      * @throws Exception if anything goes wrong
      */
- public void start(BundleContext bundleContext) throws Exception
+ public void start(BundleContext bContext) throws Exception
     {
         logger.debug("Service Impl: " + getClass().getName() + " [ STARTED ]");
         
- ConfigurationActivator.bundleContext = bundleContext;
+ ConfigurationActivator.bundleContext = bContext;
         impl.start();

         bundleContext.registerService(ConfigurationService.class.getName(),

Modified: trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java&p2=trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java 2009-03-28 13:47:19+0000
@@ -504,7 +504,7 @@
             DocumentBuilderFactory factory =
                 DocumentBuilderFactory.newInstance();
             DocumentBuilder builder = factory.newDocumentBuilder();
- Map<String, Object> properties = new Hashtable<String, Object>();
+ Map<String, Object> props = new Hashtable<String, Object>();

             //if the file is empyt (or contains only sth insignificant)
             //ifnore it and create a new document.
@@ -525,11 +525,11 @@
                 {
                     StringBuffer propertyNameBuff = new StringBuffer();
                     propertyNameBuff.append(currentNode.getNodeName());
- loadNode(currentNode, propertyNameBuff, properties);
+ loadNode(currentNode, propertyNameBuff, props);
                 }
             }

- return properties;
+ return props;
         }
         catch(SAXException ex)
         {
@@ -646,9 +646,9 @@
      * @param properties the dictionary object where all properties extracted
      * from this node and its children should be recorded.
      */
- private void loadNode(Node node,
+ private void loadNode(Node node,
                           StringBuffer propertyNameBuff,
- Map<String, Object> properties)
+ Map<String, Object> props)
     {
         Node currentNode = null;
         NodeList children = node.getChildNodes();
@@ -678,19 +678,19 @@
                     if(propertyType != null
                        && propertyType.equals(SYSTEM_ATTRIBUTE_TRUE))
                     {
- properties.put(
+ props.put(
                             newPropBuff.toString(),
                             new PropertyReference(newPropBuff.toString()));
                         System.setProperty(newPropBuff.toString(), value);
                     }
                     else
                     {
- properties.put(newPropBuff.toString(), value);
+ props.put(newPropBuff.toString(), value);
                     }
                 }

                 //load child nodes
- loadNode(currentNode, newPropBuff, properties);
+ loadNode(currentNode, newPropBuff, props);
             }
         }
     }
@@ -708,9 +708,9 @@
      * @param properties the dictionary object where the up to date values of
      * the node should be queried.
      */
- private void updateNode(Node node,
+ private void updateNode(Node node,
                             StringBuffer propertyNameBuff,
- Map<String, Object> properties)
+ Map<String, Object> props)
     {
         Node currentNode = null;
         NodeList children = node.getChildNodes();
@@ -730,7 +730,7 @@
                 if(attr != null)
                 {
                     //update the corresponding node
- Object value = properties.get(newPropBuff.toString());
+ Object value = props.get(newPropBuff.toString());

                     if(value == null)
                     {
@@ -757,7 +757,7 @@
                 }

                 //update child nodes
- updateNode(currentNode, newPropBuff, properties);
+ updateNode(currentNode, newPropBuff, props);
             }
         }
     }

Modified: trunk/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java&p2=trunk/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java (original)
+++ trunk/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java 2009-03-28 13:47:19+0000
@@ -142,7 +142,7 @@
             DocumentBuilderFactory factory =
                 DocumentBuilderFactory.newInstance();
             DocumentBuilder builder = factory.newDocumentBuilder();
- Map<String, Object> properties = new Hashtable<String, Object>();
+ Map<String, Object> props = new Hashtable<String, Object>();

             //if the file is empty (or contains only sth insignificant)
             //ifnore it and create a new document.
@@ -163,11 +163,11 @@
                 {
                     StringBuffer propertyNameBuff = new StringBuffer();
                     propertyNameBuff.append(currentNode.getNodeName());
- loadNode(currentNode, propertyNameBuff, properties);
+ loadNode(currentNode, propertyNameBuff, props);
                 }
             }

- return properties;
+ return props;
         }
         catch(SAXException ex)
         {
@@ -195,7 +195,7 @@
      */
     private void loadNode(Node node,
                           StringBuffer propertyNameBuff,
- Map<String, Object> properties)
+ Map<String, Object> props)
     {
         Node currentNode = null;
         NodeList children = node.getChildNodes();
@@ -225,19 +225,19 @@
                     if(propertyType != null
                        && propertyType.equals(SYSTEM_ATTRIBUTE_TRUE))
                     {
- properties.put(
+ props.put(
                             newPropBuff.toString(),
                             new PropertyReference(newPropBuff.toString()));
                         System.setProperty(newPropBuff.toString(), value);
                     }
                     else
                     {
- properties.put(newPropBuff.toString(), value);
+ props.put(newPropBuff.toString(), value);
                     }
                 }

                 //load child nodes
- loadNode(currentNode, newPropBuff, properties);
+ loadNode(currentNode, newPropBuff, props);
             }
         }
     }
@@ -382,11 +382,11 @@
      * @param propertyNameBuff a StringBuffer containing the prefix describing
      * the dot separated route to the specified node including its
      * one name
- * @param properties the dictionary object where the up to date values of
+ * @param props the dictionary object where the up to date values of
      * the node should be queried.
      */
     private void updateNode(Node node, StringBuffer propertyNameBuff,
- Map<String, Object> properties)
+ Map<String, Object> props)
     {
         Node currentNode = null;
         NodeList children = node.getChildNodes();
@@ -406,7 +406,7 @@
                 if (attr != null)
                 {
                     // update the corresponding node
- Object value = properties.get(newPropBuff.toString());
+ Object value = props.get(newPropBuff.toString());

                     if (value == null)
                     {
@@ -433,7 +433,7 @@
                 }

                 // update child nodes
- updateNode(currentNode, newPropBuff, properties);
+ updateNode(currentNode, newPropBuff, props);
             }
         }
     }

Modified: trunk/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java&p2=trunk/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java (original)
+++ trunk/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java 2009-03-28 13:47:19+0000
@@ -247,14 +247,14 @@
      * of the contact list file.
      *
      * @param bc a reference to the currently valid OSGI <tt>BundleContext</tt>
- * @param mclServiceImpl a reference to the currently valid instance of the
+ * @param mclServImpl a reference to the currently valid instance of the
      * <tt>MetaContactListServiceImpl</tt> that we could use to pass
      * parsed contacts and contact groups.
      * @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.
      */
- void start(BundleContext bc, MetaContactListServiceImpl mclServiceImpl)
+ void start(BundleContext bc, MetaContactListServiceImpl mclServImpl)
         throws IOException,
         XMLException
     {
@@ -328,7 +328,7 @@
             {
                 // if the contact list does not exist - create it.
                 contactListDocument = builder.newDocument();
- initVirginDocument(mclServiceImpl, contactListDocument);
+ initVirginDocument(mclServImpl, contactListDocument);

                 // write the contact list so that it is there for the parser
                 storeContactList0();
@@ -348,7 +348,7 @@
                     contactlistFile.delete();
                     contactlistFile.createNewFile();
                     contactListDocument = builder.newDocument();
- initVirginDocument(mclServiceImpl, contactListDocument);
+ initVirginDocument(mclServImpl, contactListDocument);

                     // write the contact list so that it is there for the parser
                     storeContactList0();
@@ -362,8 +362,8 @@
             logger.error("Error finding configuration for default parsers", ex);
         }

- mclServiceImpl.addMetaContactListListener(this);
- this.mclServiceImpl = mclServiceImpl;
+ mclServImpl.addMetaContactListListener(this);
+ this.mclServiceImpl = mclServImpl;
         started = true;
         this.launchStorageThread();
     }
@@ -481,8 +481,8 @@
      */
     public void storeContactListAndStopStorageManager()
     {
- Object contactListRWLock = getContactListRWLock();
- synchronized (contactListRWLock)
+ Object contactLstRWLock = getContactListRWLock();
+ synchronized (contactLstRWLock)
         {
             if (!isStarted())
                 return;
@@ -490,7 +490,7 @@
             started = false;

             // make sure everyone gets released after we finish.
- contactListRWLock.notifyAll();
+ contactLstRWLock.notifyAll();

             // write the contact list ourselves before we go out..
             try
@@ -555,20 +555,20 @@
      * Fills the document with the tags necessary for it to be filled properly
      * as the meta contact list evolves.
      *
- * @param mclServiceImpl the meta contact list service to use when
+ * @param mclServImpl the meta contact list service to use when
      * initializing the document.
- * @param contactListDocument the document to init.
+ * @param contactListDoc the document to init.
      */
- private void initVirginDocument(MetaContactListServiceImpl mclServiceImpl,
- Document contactListDocument)
+ private void initVirginDocument(MetaContactListServiceImpl mclServImpl,
+ Document contactListDoc)
     {
- Element root = contactListDocument.createElement(DOCUMENT_ROOT_NAME);
+ Element root = contactListDoc.createElement(DOCUMENT_ROOT_NAME);

- contactListDocument.appendChild(root);
+ contactListDoc.appendChild(root);

         // create the rootGroup
         Element rootGroup =
- createMetaContactGroupNode(mclServiceImpl.getRoot());
+ createMetaContactGroupNode(mclServImpl.getRoot());

         root.appendChild(rootGroup);
     }
@@ -652,7 +652,7 @@
      * instances through <tt>mclServiceImpl</tt> as children of
      * <tt>parentGroup</tt>
      *
- * @param mclServiceImpl the <tt>MetaContactListServiceImpl</tt> for
+ * @param mclServImpl the <tt>MetaContactListServiceImpl</tt> for
      * creating new contacts and groups.
      * @param accountID a String identifier of the account whose contacts we're
      * interested in.
@@ -665,7 +665,7 @@
      * map binds UIDs to group references and may be null for top
      * level groups.
      */
- private void processGroupXmlNode(MetaContactListServiceImpl mclServiceImpl,
+ private void processGroupXmlNode(MetaContactListServiceImpl mclServImpl,
         String accountID, Element groupNode, MetaContactGroupImpl parentGroup,
         Map<String, ContactGroup> parentProtoGroups)
     {
@@ -681,7 +681,7 @@

         if (parentGroup == null)
         {
- currentMetaGroup = mclServiceImpl.rootMetaGroup;
+ currentMetaGroup = mclServImpl.rootMetaGroup;
         }
         else
         {
@@ -692,7 +692,7 @@

             // create the meta group
             currentMetaGroup =
- mclServiceImpl.loadStoredMetaContactGroup(parentGroup,
+ mclServImpl.loadStoredMetaContactGroup(parentGroup,
                     groupMetaUID, groupDisplayName);
             // extract and load one by one all proto groups in this meta group.
             Node protoGroupsNode =
@@ -742,7 +742,7 @@

                 // create the proto group
                 ContactGroup newProtoGroup =
- mclServiceImpl.loadStoredContactGroup(currentMetaGroup,
+ mclServImpl.loadStoredContactGroup(currentMetaGroup,
                         protoGroupUID, parentProtoGroup, persistentData,
                         accountID);

@@ -830,7 +830,7 @@
                 }

                 // pass the parsed proto contacts to the mcl service
- mclServiceImpl.loadStoredMetaContact(currentMetaGroup, uid,
+ mclServImpl.loadStoredMetaContact(currentMetaGroup, uid,
                     displayName, details, protoContacts, accountID);
             }
             catch (Throwable thr)
@@ -843,8 +843,7 @@
                     + ". Will remove and continue with other contacts", thr);

                 // remove the node so that it doesn't cause us problems again
- if (currentMetaContactNode != null
- && currentMetaContactNode.getParentNode() != null)
+ if (currentMetaContactNode.getParentNode() != null)
                 {
                     try
                     {
@@ -883,7 +882,7 @@

             try
             {
- processGroupXmlNode(mclServiceImpl, accountID,
+ processGroupXmlNode(mclServImpl, accountID,
                     (Element) currentGroupNode, currentMetaGroup,
                     protoGroupsMap);
             }
@@ -895,8 +894,7 @@
                     + ". Removing.", throwable);

                 // remove the node so that it doesn't cause us problems again
- if (currentGroupNode != null
- && currentGroupNode.getParentNode() != null)
+ if (currentGroupNode.getParentNode() != null)
                 {
                     try
                     {

Modified: trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java&p2=trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java 2009-03-28 13:47:19+0000
@@ -363,14 +363,14 @@
      * Returns a contact group encapsulated by this meta contact group, having
      * the specified groupName and coming from the indicated ownerProvider.
      *
- * @param groupName the name of the contact group who we're looking for.
+ * @param grpName1 the name of the contact group who we're looking for.
      * @param ownerProvider a reference to the ProtocolProviderService that
      * the contact we're looking for belongs to.
      * @return a reference to a <tt>ContactGroup</tt>, encapsulated by this
      * MetaContactGroup, carrying the specified name and originating from the
      * specified ownerProvider or null if no such contact group was found.
      */
- public ContactGroup getContactGroup(String groupName,
+ public ContactGroup getContactGroup(String grpName,
                                         ProtocolProviderService ownerProvider)
     {
         Iterator<ContactGroup> encapsulatedGroups = getContactGroups();
@@ -379,7 +379,7 @@
         {
             ContactGroup group = encapsulatedGroups.next();

- if (group.getGroupName().equals(groupName)
+ if (group.getGroupName().equals(grpName)
                 && group.getProtocolProvider() == ownerProvider)
             {
                 return group;
@@ -403,7 +403,7 @@
                                             ProtocolProviderService provider)
     {
         Iterator<ContactGroup> encapsulatedGroups = getContactGroups();
- LinkedList<ContactGroup> protoGroups = new LinkedList<ContactGroup>();
+ LinkedList<ContactGroup> protGroups = new LinkedList<ContactGroup>();

         while(encapsulatedGroups.hasNext())
         {
@@ -411,10 +411,10 @@

             if(group.getProtocolProvider() == provider)
             {
- protoGroups.add(group);
+ protGroups.add(group);
             }
         }
- return protoGroups.iterator();
+ return protGroups.iterator();
     }

     /**
@@ -437,7 +437,7 @@
     public Iterator<ContactGroup> getContactGroupsForAccountID(String accountID)
     {
         Iterator<ContactGroup> encapsulatedGroups = getContactGroups();
- LinkedList<ContactGroup> protoGroups = new LinkedList<ContactGroup>();
+ LinkedList<ContactGroup> protGroups = new LinkedList<ContactGroup>();

         while(encapsulatedGroups.hasNext())
         {
@@ -446,10 +446,10 @@
             if(group.getProtocolProvider().getAccountID()
                .getAccountUniqueID().equals(accountID))
             {
- protoGroups.add(group);
+ protGroups.add(group);
             }
         }
- return protoGroups.iterator();
+ return protGroups.iterator();
     }

     /**
@@ -680,11 +680,11 @@
     /**
      * Returns the <tt>MetaContactGroup</tt> with the specified name.
      *
- * @param groupName the name of the group to return.
+ * @param grpName the name of the group to return.
      * @return the <tt>MetaContactGroup</tt> with the specified name or null
      * if no such group exists.
      */
- public MetaContactGroup getMetaContactSubgroup(String groupName)
+ public MetaContactGroup getMetaContactSubgroup(String grpName)
     {
         Iterator<MetaContactGroup> groupsIter = getSubgroups();

@@ -692,7 +692,7 @@
         {
             MetaContactGroup mcGroup = groupsIter.next();

- if(mcGroup.getGroupName().equals(groupName))
+ if(mcGroup.getGroupName().equals(grpName))
                 return mcGroup;
         }

@@ -702,11 +702,11 @@
     /**
      * Returns the <tt>MetaContactGroup</tt> with the specified groupUID.
      *
- * @param groupUID the uid of the group to return.
+ * @param grpUID the uid of the group to return.
      * @return the <tt>MetaContactGroup</tt> with the specified uid or null
      * if no such group exists.
      */
- public MetaContactGroup getMetaContactSubgroupByUID(String groupUID)
+ public MetaContactGroup getMetaContactSubgroupByUID(String grpUID)
     {
         Iterator<MetaContactGroup> groupsIter = getSubgroups();

@@ -714,7 +714,7 @@
         {
             MetaContactGroup mcGroup = groupsIter.next();

- if(mcGroup.getMetaUID().equals(groupUID))
+ if(mcGroup.getMetaUID().equals(grpUID))
                 return mcGroup;
         }

Modified: trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java&p2=trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java 2009-03-28 13:47:19+0000
@@ -801,15 +801,15 @@
      * If <tt>parentGroup</tt> was the parent of this meta contact then it
      * sets it to null. Call this method when removing this contact from a
      * meta contact group.
- * @param parentGroup the <tt>MetaContactGroupImpl</tt> that we don't want
+ * @param parentGrp the <tt>MetaContactGroupImpl</tt> that we don't want
      * considered as a parent of this contact any more.
      */
- void unsetParentGroup(MetaContactGroupImpl parentGroup)
+ void unsetParentGroup(MetaContactGroupImpl parentGrp)
     {
         synchronized(parentGroupModLock)
         {
- if (this.parentGroup == parentGroup)
- this.parentGroup = null;
+ if (parentGroup == parentGrp)
+ parentGroup = null;
         }
     }

Modified: trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java&p2=trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java 2009-03-28 13:47:19+0000
@@ -901,7 +901,7 @@

         //if the contact is not currently in the proto group corresponding to
         //its new metacontact group parent then move it
- if(contact.getParentContactGroup() != parentProtoGroup)
+ if(contact.getParentContactGroup() != parentProtoGroup && opSetPresence != null)
             opSetPresence.moveContactToGroup(contact, parentProtoGroup);

         ( (MetaContactImpl) newParentMetaContact).addProtoContact(contact);
@@ -994,8 +994,10 @@
                 {
                     /** @todo handle non persistent presence operation sets */
                 }
-
- opSetPresence.moveContactToGroup(protoContact, protoGroup);
+ else
+ {
+ opSetPresence.moveContactToGroup(protoContact, protoGroup);
+ }
             }
         }
         catch (Exception ex)
@@ -1158,7 +1160,7 @@

         MetaContactGroupImpl parentMetaGroup = (MetaContactGroupImpl)
- findParentMetaContactGroup( (MetaContactGroupImpl) groupToRemove);
+ findParentMetaContactGroup(groupToRemove);

         parentMetaGroup.removeSubgroup(groupToRemove);

@@ -2949,13 +2951,13 @@
          * @param evt a ServerStoredGroupChangeEvent containing a reference to
          * the newly created group.
          */
- public void groupCreated(ServerStoredGroupEvent evt)
+ public void groupCreated(ServerStoredGroupEvent event)
         {
             synchronized (this)
             {
- if (evt.getSourceGroup().getGroupName().equals(groupName))
+ if (event.getSourceGroup().getGroupName().equals(groupName))
                 {
- this.evt = evt;
+ this.evt = event;
                     this.notifyAll();
                 }
             }
@@ -2965,21 +2967,21 @@
          * Evens delivered through this method are ignored
          * @param evt param ignored
          */
- public void groupRemoved(ServerStoredGroupEvent evt)
+ public void groupRemoved(ServerStoredGroupEvent event)
         {}

         /**
          * Evens delivered through this method are ignored
          * @param evt param ignored
          */
- public void groupNameChanged(ServerStoredGroupEvent evt)
+ public void groupNameChanged(ServerStoredGroupEvent event)
         {}

         /**
          * Evens delivered through this method are ignored
          * @param evt param ignored
          */
- public void groupResolved(ServerStoredGroupEvent evt)
+ public void groupResolved(ServerStoredGroupEvent event)
         {}

         /**
@@ -3028,21 +3030,21 @@
          * Events delivered through this method are ignored
          * @param evt param ignored
          */
- public void groupResolved(ServerStoredGroupEvent evt)
+ public void groupResolved(ServerStoredGroupEvent event)
         {}

         /**
          * Events delivered through this method are ignored
          * @param evt param ignored
          */
- public void groupRemoved(ServerStoredGroupEvent evt)
+ public void groupRemoved(ServerStoredGroupEvent event)
         {}

         /**
          * Events delivered through this method are ignored
          * @param evt param ignored
          */
- public void groupNameChanged(ServerStoredGroupEvent evt)
+ public void groupNameChanged(ServerStoredGroupEvent event)
         {}

         /**
@@ -3059,18 +3061,18 @@
         /**
          * Called whenever an indication is received that a new server stored group
          * is created.
- * @param evt a ServerStoredGroupEvent containing a reference to the
+ * @param event a ServerStoredGroupEvent containing a reference to the
          * newly created group.
          */
- public void groupCreated(ServerStoredGroupEvent evt)
+ public void groupCreated(ServerStoredGroupEvent event)
         {
             synchronized (this)
             {
                 Contact contact
- = evt.getSourceGroup().getContact(subscriptionAddress);
+ = event.getSourceGroup().getContact(subscriptionAddress);
                 if ( contact != null)
                 {
- this.evt = evt;
+ this.evt = event;
                     this.sourceContact = contact;
                     this.notifyAll();
                 }
@@ -3081,19 +3083,19 @@
         /**
          * Called whenever an indication is received that a subscription is
          * created.
- * @param evt a <tt>SubscriptionEvent</tt> containing a reference to
+ * @param event a <tt>SubscriptionEvent</tt> containing a reference to
          * the newly created contact.
          */
- public void subscriptionCreated(SubscriptionEvent evt)
+ public void subscriptionCreated(SubscriptionEvent event)
         {
             synchronized (this)
             {
- if (evt.getSourceContact().getAddress()
+ if (event.getSourceContact().getAddress()
                     .equals(subscriptionAddress)
- || evt.getSourceContact().equals(subscriptionAddress))
+ || event.getSourceContact().equals(subscriptionAddress))
                 {
- this.evt = evt;
- this.sourceContact = evt.getSourceContact();
+ this.evt = event;
+ this.sourceContact = event.getSourceContact();
                     this.notifyAll();
                 }
             }
@@ -3103,24 +3105,24 @@
          * Events delivered through this method are ignored
          * @param evt param ignored
          */
- public void subscriptionRemoved(SubscriptionEvent evt)
+ public void subscriptionRemoved(SubscriptionEvent event)
         {}

         /**
          * Called whenever an indication is received that a subscription
          * creation has failed.
- * @param evt a <tt>SubscriptionEvent</tt> containing a reference to
+ * @param event a <tt>SubscriptionEvent</tt> containing a reference to
          * the contact we are trying to subscribe.
          */
- public void subscriptionFailed(SubscriptionEvent evt)
+ public void subscriptionFailed(SubscriptionEvent event)
         {
             synchronized (this)
             {
- if (evt.getSourceContact().getAddress()
+ if (event.getSourceContact().getAddress()
                     .equals(subscriptionAddress))
                 {
- this.evt = evt;
- this.sourceContact = evt.getSourceContact();
+ this.evt = event;
+ this.sourceContact = event.getSourceContact();
                     this.notifyAll();
                 }
             }
@@ -3130,21 +3132,21 @@
          * Events delivered through this method are ignored
          * @param evt param ignored
          */
- public void subscriptionMoved(SubscriptionMovedEvent evt)
+ public void subscriptionMoved(SubscriptionMovedEvent event)
         {}

         /**
          * Events delivered through this method are ignored
          * @param evt param ignored
          */
- public void subscriptionResolved(SubscriptionEvent evt)
+ public void subscriptionResolved(SubscriptionEvent event)
         {}

         /**
          * Events delivered through this method are ignored
          * @param evt param ignored
          */
- public void contactModified(ContactPropertyChangeEvent evt)
+ public void contactModified(ContactPropertyChangeEvent event)
         {}

         /**

Modified: trunk/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java&p2=trunk/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java (original)
+++ trunk/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java 2009-03-28 13:47:19+0000
@@ -61,7 +61,7 @@
         }
     }

- public void stop(BundleContext bundleContext) throws Exception
+ public void stop(BundleContext bContext) throws Exception
     {
         logger.info("Growl Notification Service ...[Stopped]");
     }

Modified: trunk/src/net/java/sip/communicator/impl/gui/GuiActivator.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/GuiActivator.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/GuiActivator.java&p2=trunk/src/net/java/sip/communicator/impl/gui/GuiActivator.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/GuiActivator.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/GuiActivator.java 2009-03-28 13:47:19+0000
@@ -69,11 +69,11 @@
      *
      * @param bundleContext The execution context of the bundle being started.
      */
- public void start(BundleContext bundleContext)
+ public void start(BundleContext bContext)
         throws Exception
     {
         isStarted = true;
- GuiActivator.bundleContext = bundleContext;
+ GuiActivator.bundleContext = bContext;

         NotificationManager.registerGuiNotifications();
         notificationServiceListener = new NotificationServiceListener();
@@ -110,13 +110,13 @@
      * Called when this bundle is stopped so the Framework can perform the
      * bundle-specific activities necessary to stop the bundle.
      *
- * @param bundleContext The execution context of the bundle being stopped.
+ * @param bContext The execution context of the bundle being stopped.
      * @throws Exception If this method throws an exception, the bundle is
      * still marked as stopped, and the Framework will remove the bundle's
      * listeners, unregister all services registered by the bundle, and
      * release all services used by the bundle.
      */
- public void stop(BundleContext bundleContext) throws Exception
+ public void stop(BundleContext bContext) throws Exception
     {
         logger.info("UI Service ...[STOPPED]");
         isStarted = false;
@@ -124,8 +124,8 @@
         GuiActivator.getConfigurationService()
             .removePropertyChangeListener(uiService);

- bundleContext.removeServiceListener(uiService);
- bundleContext.removeServiceListener(notificationServiceListener);
+ bContext.removeServiceListener(uiService);
+ bContext.removeServiceListener(notificationServiceListener);
     }

     /**
@@ -152,17 +152,19 @@
             logger.error("LoginManager : " + e);
         }

- for (int i = 0; i < serRefs.length; i++)
+ if (serRefs != null)
         {
+ for (int i = 0; i < serRefs.length; i++)
+ {

- ProtocolProviderFactory providerFactory =
- (ProtocolProviderFactory) bundleContext.getService(serRefs[i]);
+ ProtocolProviderFactory providerFactory = (ProtocolProviderFactory) bundleContext
+ .getService(serRefs[i]);

- providerFactoriesMap
- .put(serRefs[i].getProperty(ProtocolProviderFactory.PROTOCOL),
- providerFactory);
+ providerFactoriesMap.put(serRefs[i]
+ .getProperty(ProtocolProviderFactory.PROTOCOL),
+ providerFactory);
+ }
         }
-
         return providerFactoriesMap;
     }

Modified: trunk/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java&p2=trunk/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java 2009-03-28 13:47:19+0000
@@ -34,9 +34,9 @@
      *
      * @param message the object to display
      */
- public String showInputPopupDialog(Object message)
+ public String showInputPopupDialog(Object mesg)
     {
- return showInputDialog(message);
+ return showInputDialog(mesg);
     }

     /**
@@ -48,10 +48,10 @@
      * @param initialSelectionValue the value used to initialize the input
      * field.
      */
- public String showInputPopupDialog(Object message,
- String initialSelectionValue)
+ public String showInputPopupDialog(Object mesg,
+ String initialSelectionVal)
     {
- return showInputDialog(message, initialSelectionValue);
+ return showInputDialog(mesg, initialSelectionVal);
     }

     /**
@@ -64,11 +64,11 @@
      * INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
      * @param title the String to display in the dialog title bar
      */
- public String showInputPopupDialog(Object message, String title,
- int messageType)
+ public String showInputPopupDialog(Object mesg, String title,
+ int mesgType)
     {
- return showInputDialog(null, message, title,
- popupDialog2JOptionPaneMessageType(messageType));
+ return showInputDialog(null, mesg, title,
+ popupDialog2JOptionPaneMessageType(mesgType));
     }

     private static int popupDialog2JOptionPaneMessageType(int type)
@@ -101,12 +101,12 @@
      * selections
      * @param initialSelectionValue the value used to initialize the input field
      */
- public Object showInputPopupDialog(Object message, String title,
- int messageType, Object[] selectionValues, Object initialSelectionValue)
+ public Object showInputPopupDialog(Object mesg, String title,
+ int mesgType, Object[] selectionVal, Object initialSelectionVal)
     {
- return showInputDialog(null, message, title,
- popupDialog2JOptionPaneMessageType(messageType), null,
- selectionValues, initialSelectionValue);
+ return showInputDialog(null, mesg, title,
+ popupDialog2JOptionPaneMessageType(mesgType), null,
+ selectionVal, initialSelectionVal);
     }

     /**
@@ -124,13 +124,13 @@
      * @param initialSelectionValue the value used to initialize the input field
      * @param icon the icon to show in the input window.
      */
- public Object showInputPopupDialog(Object message, String title,
- int messageType, Object[] selectionValues,
- Object initialSelectionValue, byte[] icon)
- {
- return showInputDialog(null, message, title,
- popupDialog2JOptionPaneMessageType(messageType),
- createImageIcon(icon), selectionValues, initialSelectionValue);
+ public Object showInputPopupDialog(Object mesg, String title,
+ int mesgType, Object[] selectionVal,
+ Object initialSelectionVal, byte[] icn)
+ {
+ return showInputDialog(null, mesg, title,
+ popupDialog2JOptionPaneMessageType(mesgType),
+ createImageIcon(icn), selectionVal, initialSelectionVal);
     }

     private static ImageIcon createImageIcon(byte[] icon)
@@ -145,9 +145,9 @@
      *
      * @param message the Object to display
      */
- public void showMessagePopupDialog(Object message)
+ public void showMessagePopupDialog(Object mesg)
     {
- showMessageDialog(null, message);
+ showMessageDialog(null, mesg);
     }

     /**
@@ -160,11 +160,11 @@
      * @param messageType the type of message to be displayed: ERROR_MESSAGE,
      * INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
      */
- public void showMessagePopupDialog(Object message, String title,
- int messageType)
+ public void showMessagePopupDialog(Object mesg, String title,
+ int mesgType)
     {
- showMessageDialog(null, message, title,
- popupDialog2JOptionPaneMessageType(messageType));
+ showMessageDialog(null, mesg, title,
+ popupDialog2JOptionPaneMessageType(mesgType));
     }

     /**
@@ -178,12 +178,12 @@
      * INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
      * @param icon the image to display in the message dialog.
      */
- public void showMessagePopupDialog(Object message, String title,
- int messageType, byte[] icon)
+ public void showMessagePopupDialog(Object mesg, String title,
+ int mesgType, byte[] icn)
     {
- showMessageDialog(null, message, title,
- popupDialog2JOptionPaneMessageType(messageType),
- createImageIcon(icon));
+ showMessageDialog(null, mesg, title,
+ popupDialog2JOptionPaneMessageType(mesgType),
+ createImageIcon(icn));
     }

     /**
@@ -193,9 +193,9 @@
      *
      * @param message the message to display
      */
- public int showConfirmPopupDialog(Object message)
+ public int showConfirmPopupDialog(Object mesg)
     {
- return showConfirmDialog(null, message);
+ return showConfirmDialog(null, mesg);
     }

     /**
@@ -208,11 +208,11 @@
      * @param optionType an integer designating the options available on the
      * dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
      */
- public int showConfirmPopupDialog(Object message, String title,
- int optionType)
+ public int showConfirmPopupDialog(Object mesg, String title,
+ int optType)
     {
- return showConfirmDialog(null, message, title,
- popupDialog2JOptionPaneOptionType(optionType));
+ return showConfirmDialog(null, mesg, title,
+ popupDialog2JOptionPaneOptionType(optType));
     }

     private static int popupDialog2JOptionPaneOptionType(int optionType)
@@ -243,12 +243,12 @@
      * ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE,
      * or PLAIN_MESSAGE
      */
- public int showConfirmPopupDialog(Object message, String title,
- int optionType, int messageType)
+ public int showConfirmPopupDialog(Object mesg, String title,
+ int optType, int mesgType)
     {
- return showConfirmDialog(null, message, title,
- popupDialog2JOptionPaneOptionType(optionType),
- popupDialog2JOptionPaneMessageType(messageType));
+ return showConfirmDialog(null, mesg, title,
+ popupDialog2JOptionPaneOptionType(optType),
+ popupDialog2JOptionPaneMessageType(mesgType));
     }

     /**
@@ -266,13 +266,13 @@
      * or PLAIN_MESSAGE
      * @param icon the icon to display in the dialog
      */
- public int showConfirmPopupDialog(Object message, String title,
- int optionType, int messageType, byte[] icon)
+ public int showConfirmPopupDialog(Object mesg, String title,
+ int optType, int mesgType, byte[] icn)
     {
- return showConfirmDialog(null, message, title,
- popupDialog2JOptionPaneOptionType(optionType),
- popupDialog2JOptionPaneMessageType(messageType),
- createImageIcon(icon));
+ return showConfirmDialog(null, mesg, title,
+ popupDialog2JOptionPaneOptionType(optType),
+ popupDialog2JOptionPaneMessageType(mesgType),
+ createImageIcon(icn));
     }

     /**

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java 2009-03-28 13:47:19+0000
@@ -18,6 +18,8 @@
  */
public class BoxPopupMenu extends JPopupMenu {

+ private static final long serialVersionUID = -8488327445916201464L;
+
     private int itemsCount;

     private int gridRowCount = 0;

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java 2009-03-28 13:47:19+0000
@@ -33,6 +33,8 @@
     implements ActionListener,
                 HyperlinkListener
{
+ private static final long serialVersionUID = 1L;
+
     private final Logger logger = Logger.getLogger(ErrorDialog.class);

     private JButton okButton = new JButton(
@@ -69,8 +71,6 @@

     public static final int WARNING = 1;

- public static final int ERROR = 0;
-
     /**
      * The maximum width that we allow message dialogs to have.
      */

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java 2009-03-28 13:47:19+0000
@@ -20,6 +20,8 @@
     extends JPanel
     implements ListCellRenderer
{
+
+ private static final long serialVersionUID = 1L;
     private final JLabel label = new JLabel();
     private boolean isSelected;
     
@@ -34,10 +36,10 @@
      * Implements the <tt>ListCellRenderer</tt> method.
      */
     public Component getListCellRendererComponent(JList list, Object value,
- int index, boolean isSelected, boolean cellHasFocus)
+ int index, boolean isSelect, boolean cellHasFocus)
     {
         this.label.setText(value.toString());
- this.isSelected = isSelected;
+ this.isSelected = isSelect;
         
         return this;
     }

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java 2009-03-28 13:47:19+0000
@@ -27,10 +27,10 @@
      */
     public int rowIndexOf(Object value)
     {
- Vector dataVector = this.getDataVector();
+ Vector<Vector<Object>> dataVec = this.getDataVector();
         
         for(int i = 0; i < dataVector.size(); i ++) {
- Vector rowVector = (Vector)dataVector.get(i);
+ Vector<Object> rowVector = dataVec.get(i);
             
             if(rowVector.contains(value)) {
                 return i;

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java 2009-03-28 13:47:19+0000
@@ -29,6 +29,8 @@
     extends SIPCommDialog
     implements ActionListener
{
+ private static final long serialVersionUID = 1L;
+
     private JButton cancelButton = new JButton(
         GuiActivator.getResources().getI18NString("service.gui.CANCEL"));

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java 2009-03-28 13:47:19+0000
@@ -15,6 +15,7 @@
     extends DefaultCellEditor
     implements ItemListener
{
+ private static final long serialVersionUID = 1L;
     private JRadioButton button;

     public RadioButtonCellEditor(JCheckBox checkBox)

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java 2009-03-28 13:47:19+0000
@@ -46,6 +46,8 @@
     private static class SCViewport
         extends JViewport
     {
+ private static final long serialVersionUID = 1L;
+
         private final BufferedImage bgImage;

         private final Color color;

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java 2009-03-28 13:47:19+0000
@@ -22,6 +22,7 @@
public class SIPCommMenu
     extends JMenu
{
+ private static final long serialVersionUID = 1L;
     private Object selectedObject;

     /**
@@ -62,11 +63,11 @@
      * @param actionListener The <tt>ActionListener</tt>, which handles the
      * case, when the item is selected.
      */
- public void addItem(String text, Icon icon, ActionListener actionListener)
+ public void addItem(String text, Icon icon, ActionListener actionLstner)
     {
         JMenuItem item = new JMenuItem(text, icon);

- item.addActionListener(actionListener);
+ item.addActionListener(actionLstner);

         this.add(item);
     }

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java 2009-03-28 13:47:19+0000
@@ -18,6 +18,8 @@
public class StyledHTMLEditorPane
     extends JEditorPane
{
+ private static final long serialVersionUID = 1L;
+
     private final Logger logger = Logger.getLogger(StyledHTMLEditorPane.class);
     
     private final HTMLEditorKit editorKit = new SIPCommHTMLEditorKit();

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java 2009-03-28 13:47:19+0000
@@ -22,6 +22,8 @@
public class TitlePanel
     extends TransparentPanel
{
+ private static final long serialVersionUID = 1L;
+
     private final JLabel titleLabel = new JLabel();

     private final Color gradientStartColor = new Color(255, 255, 255, 200);

Modified: trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java?view=diff&rev=5183&p1=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java&p2=trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java&r1=5182&r2=5183

--- trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java 2009-03-28 13:47:19+0000
@@ -39,6 +39,8 @@
  * @author Yana Stamcheva
  */
public class TransparentBackground extends JComponent {
+ private static final long serialVersionUID = 1L;
+
     private BufferedImage background;

     private final Robot robot;
@@ -55,14 +57,14 @@
     public TransparentBackground(Window window) {
         this.window = window;

- Robot robot;
+ Robot rbt;
         try {
- robot = new Robot();
+ rbt = new Robot();
         } catch (AWTException e) {
             e.printStackTrace();
- robot = null;
+ rbt = null;
         }
- this.robot = robot;
+ this.robot = rbt;
     }

     /**

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Emil,

Emil Ivov schrieb:

Hey Werner,

I was wondering if you could shed some light on your latest commit.

I did see a few null checks that definitely make sense but am a bit
perplexed by the numerous name changes like for example:
bundleContext -> bContext; properties -> props; serviceimpl -> servimpl;
contactList -> contactLst; contactListDocument -> contactListDoc;
groupName -> grpname; protoGroups -> protGroups; groupUID -> grpUID;
parentGroup -> parentGrp; evt -> event

and my personal favorite "groupName -> grpName1" :slight_smile:

should have read: grpName (the one is a typo). The main reason
behind this renaming are that these local names (parameters or
local variables) hide global variables (name hiding) and thus
introduces some sort of ambiguity. Many Java coding standards do
not allow name hiding and at least my Eclipse flags name hiding
as Warning.

Regarding possible NP checks and other warnings: I've started a
small list that lists some problems that I didn't fix because this
should be done by the author because some more background info is
required to fix the warning (see attachment, it's just a first
start).

Maybe it would be a good idea to somewhow synchronize the Eclipse
setting with respect to Error/Warnings/Ignore. In your last check-in
you state 4000+ warning, my Eclipse reports 5000+ warning (roughly
5400) :slight_smile: . After that we could somehow split the work. I just
started top-down: walking down class by class starting with package
**.impl.argdelegation. The last package I did was
**.impl.customcontrols.

Regards,
Werner

SC-Warnings.odt (10.7 KB)

···

Was there any reason behind this that I am missing?

Cheers
Emil


#3

Hi Werner,

Name hiding for private fields of classes by parameters? :slight_smile:
And what Java Code Standards force to rename variables to
not-readable names?
Use this.bundleContext = bundleContext
but not bundleContext = bndlCntx.

PS: Try to set good color scheme in your IDE. There will be no
ambiguity more, i hope.

Emil,

Emil Ivov schrieb:

Hey Werner,

I was wondering if you could shed some light on your latest commit.

I did see a few null checks that definitely make sense but am a bit
perplexed by the numerous name changes like for example:
bundleContext -> bContext; properties -> props; serviceimpl -> servimpl;
contactList -> contactLst; contactListDocument -> contactListDoc;
groupName -> grpname; protoGroups -> protGroups; groupUID -> grpUID;
parentGroup -> parentGrp; evt -> event

and my personal favorite "groupName -> grpName1" :slight_smile:

should have read: grpName (the one is a typo). The main reason
behind this renaming are that these local names (parameters or
local variables) hide global variables (name hiding) and thus
introduces some sort of ambiguity. Many Java coding standards do
not allow name hiding and at least my Eclipse flags name hiding
as Warning.

Regarding possible NP checks and other warnings: I've started a
small list that lists some problems that I didn't fix because this
should be done by the author because some more background info is
required to fix the warning (see attachment, it's just a first
start).

Maybe it would be a good idea to somewhow synchronize the Eclipse
setting with respect to Error/Warnings/Ignore. In your last check-in
you state 4000+ warning, my Eclipse reports 5000+ warning (roughly
5400) :slight_smile: . After that we could somehow split the work. I just
started top-down: walking down class by class starting with package
**.impl.argdelegation. The last package I did was
**.impl.customcontrols.

Regards,
Werner

Was there any reason behind this that I am missing?

Cheers
Emil

Regards,
Alexandr Kazeko

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hey Werner,

Werner Dittmann wrote:

Emil,

Emil Ivov schrieb:

Hey Werner,

I was wondering if you could shed some light on your latest commit.

I did see a few null checks that definitely make sense but am a bit
perplexed by the numerous name changes like for example:
bundleContext -> bContext; properties -> props; serviceimpl -> servimpl;
contactList -> contactLst; contactListDocument -> contactListDoc;
groupName -> grpname; protoGroups -> protGroups; groupUID -> grpUID;
parentGroup -> parentGrp; evt -> event

and my personal favorite "groupName -> grpName1" :slight_smile:

should have read: grpName (the one is a typo). The main reason
behind this renaming are that these local names (parameters or
local variables) hide global variables (name hiding) and thus
introduces some sort of ambiguity. Many Java coding standards do
not allow name hiding and at least my Eclipse flags name hiding
as Warning.

Ah, ok, that explains it then.

I am not that bothered by name hiding and personally believe that
descriptive names are more important. This is however mostly a matter of
personal opinion so I'd completely understand if others feel
differently. If the majority of the developers here agree that this is
important then let's add it to both our code convention and TODO lists.
(Thoughts anyone?)

Until then we could probably put it on standby since we'll probably all
agree that regardless of the choice, this is not a major issue.

Regarding possible NP checks and other warnings: I've started a
small list that lists some problems that I didn't fix because this
should be done by the author because some more background info is
required to fix the warning (see attachment, it's just a first
start).

Nice, I kind of have the same here. Although not really list. I simply
leave the more intricate warning fixes for a later stage.

Maybe it would be a good idea to somewhow synchronize the Eclipse
setting with respect to Error/Warnings/Ignore. In your last check-in
you state 4000+ warning, my Eclipse reports 5000+ warning (roughly
5400) :slight_smile: .

Haha :). Well, seems like I'll have less fixing to do then :).

On a more serious note, yes, we should probably agree on which warnings
we'll consider as worth paying attention.

Lubo, I know you've been working on this for a while now so maybe you
already have a list with the warnings you believe are important? If so
then we could start from there and remove/add to it whatever we believe
is important.

After that we could somehow split the work. I just
started top-down: walking down class by class starting with package
**.impl.argdelegation. The last package I did was
**.impl.customcontrols.

OK, I've just opened issue #637 for this.

https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=637

I was thinking that we could block packages in there by posting
comments. This would only make sense for packages that require more
thought (max 2 or 3 at a time). You don't need to necessarily block
every package you'd like to fix a warning in. That would be counter
productive and we don't want to complicate this task too much since it
already appears as requiring substantial time.

How does this sound?

Cheers
Emil

···

Regards,
Werner

Was there any reason behind this that I am missing?

Cheers
Emil

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Alexandr,

regarding the Java code conventions/standards: here I refer
to numerous contentions, for example ESA (European Space Agency):

<quote>
Rule 26: Do not hide declarations.
     Do not declare names in one scope that hide names declared in a wider scope.
Pick different names as necessary.
Rationale
     Errors resulting from hiding a declaration, but still trying to directly refer to the
declared element, may be very difficult to spot.
</quote>

In my company (telecommunication equipment vendor) we har similare rules
in place.

alexandr.temp@gmail.com schrieb:

Hi Werner,

Name hiding for private fields of classes by parameters? :slight_smile:
And what Java Code Standards force to rename variables to
not-readable names?
Use this.bundleContext = bundleContext
but not bundleContext = bndlCntx.

I'm open for better names, just having some common
abbrevs in mid when constructing names of local variable
and parameters which have a limited scope in contrast to a more
global scope of class/instance variables

PS: Try to set good color scheme in your IDE. There will be no
ambiguity more, i hope.

Maybe, maybe not. IMHO we shouldn't rely on color schemes
of an IDE. What about printed source listings which are sometimes
still valuabe.

Emil,

Regards,
Werner

PS: every heared/read the "hungarian coding standard" that is
used by MS for C/C++. You will never complain about unreadable
names again :slight_smile: .

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

Emil,

Emil Ivov schrieb:

Hey Werner,

Werner Dittmann wrote:

Emil,

I am not that bothered by name hiding and personally believe that
descriptive names are more important. This is however mostly a matter of
personal opinion so I'd completely understand if others feel
differently. If the majority of the developers here agree that this is
important then let's add it to both our code convention and TODO lists.
(Thoughts anyone?)

Until then we could probably put it on standby since we'll probably all
agree that regardless of the choice, this is not a major issue.

Fine with me - saves some clean-up efforts at least (for the time being).

Regarding possible NP checks and other warnings: I've started a
small list that lists some problems that I didn't fix because this
should be done by the author because some more background info is
required to fix the warning (see attachment, it's just a first
start).

Nice, I kind of have the same here. Although not really list. I simply
leave the more intricate warning fixes for a later stage.

Agreed. Some fixes need some more in-depth analysis.

Maybe it would be a good idea to somewhow synchronize the Eclipse
setting with respect to Error/Warnings/Ignore. In your last check-in
you state 4000+ warning, my Eclipse reports 5000+ warning (roughly
5400) :slight_smile: .

Haha :). Well, seems like I'll have less fixing to do then :).

On a more serious note, yes, we should probably agree on which warnings
we'll consider as worth paying attention.

Lubo, I know you've been working on this for a while now so maybe you
already have a list with the warnings you believe are important? If so
then we could start from there and remove/add to it whatever we believe
is important.

Agreed. In parallel to the Eclipse compiler feature I used a tool named PMD
(is available as Eclipse plugin), but this reported an even bigger number thus
IMHO we should remove / reduce the pure Eclipse warnings first.

OK, I've just opened issue #637 for this.

https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=637

I was thinking that we could block packages in there by posting
comments. This would only make sense for packages that require more
thought (max 2 or 3 at a time). You don't need to necessarily block
every package you'd like to fix a warning in. That would be counter
productive and we don't want to complicate this task too much since it
already appears as requiring substantial time.

How does this sound?

Agreed. Simple stuff like raw type fixes, serial UID, and alike don't
need blocking. IMHO we shall do this sort of cleanup if there is spare
time - not as a prio one task.

Cheers
Emil

Regards,
Werner

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net