diff options
author | Werner Dittmann <wernerd@java.net> | 2009-03-28 13:47:19 +0000 |
---|---|---|
committer | Werner Dittmann <wernerd@java.net> | 2009-03-28 13:47:19 +0000 |
commit | 9087cf73216e6232dd4e1695ba3ba1bc3815d250 (patch) | |
tree | abeac579b6087183460e55f15c71bbd1d2dade4b /src/net | |
parent | 7df59f465c96e2c3b182c5022eeb8d9d2d9c62dc (diff) | |
download | jitsi-9087cf73216e6232dd4e1695ba3ba1bc3815d250.zip jitsi-9087cf73216e6232dd4e1695ba3ba1bc3815d250.tar.gz jitsi-9087cf73216e6232dd4e1695ba3ba1bc3815d250.tar.bz2 |
Some code clean-up, remove warnings, no new functions or features.
Diffstat (limited to 'src/net')
25 files changed, 203 insertions, 188 deletions
diff --git a/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java b/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java index 53ced1f..b39e82f 100644 --- a/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java +++ b/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierActivator.java @@ -39,10 +39,10 @@ public class AudioNotifierActivator implements BundleActivator * * @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 @@ public class AudioNotifierActivator implements BundleActivator * 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 { diff --git a/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java b/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java index 81e9810..4b43d08 100644 --- a/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java +++ b/src/net/java/sip/communicator/impl/audionotifier/AudioNotifierServiceImpl.java @@ -62,9 +62,6 @@ public class AudioNotifierServiceImpl try { audioClip = new SCAudioClipImpl(url, this); - - if(audioClip == null) - return null; } catch (Throwable e) { diff --git a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java index c3670bc..b2c2bbb 100644 --- a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java @@ -377,7 +377,7 @@ public class CallHistoryServiceImpl 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 @@ public class CallHistoryServiceImpl * * @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; diff --git a/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java b/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java index 818366e..cba6a07 100644 --- a/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java +++ b/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java @@ -98,7 +98,7 @@ public class ChangeEventDispatcher propertyChangeChildren = new Hashtable<String, ChangeEventDispatcher>(); } - ChangeEventDispatcher child = (ChangeEventDispatcher) propertyChangeChildren.get( + ChangeEventDispatcher child = propertyChangeChildren.get( propertyName); if (child == null) { @@ -298,7 +298,7 @@ public class ChangeEventDispatcher } } - if (vetoableChangeListeners != null) + if (vetoableChangeListeners != null && targets != null) { for (int i = 0; i < targets.length; i++) { diff --git a/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java b/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java index 9ca328f..b2db315 100644 --- a/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java +++ b/src/net/java/sip/communicator/impl/configuration/ConfigurationActivator.java @@ -32,11 +32,11 @@ public class ConfigurationActivator * 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(), diff --git a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java index 53c2a04..e9d4431 100644 --- a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java +++ b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java @@ -504,7 +504,7 @@ public class ConfigurationServiceImpl 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 @@ public class ConfigurationServiceImpl { 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 @@ public class ConfigurationServiceImpl * @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 @@ public class ConfigurationServiceImpl 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 @@ public class ConfigurationServiceImpl * @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 @@ public class ConfigurationServiceImpl 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 @@ public class ConfigurationServiceImpl } //update child nodes - updateNode(currentNode, newPropBuff, properties); + updateNode(currentNode, newPropBuff, props); } } } diff --git a/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java b/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java index c292227..319a2b1 100644 --- a/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java +++ b/src/net/java/sip/communicator/impl/configuration/xml/XMLConfigurationStore.java @@ -142,7 +142,7 @@ public class XMLConfigurationStore 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 @@ public class XMLConfigurationStore {
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 @@ public class XMLConfigurationStore */
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 @@ public class XMLConfigurationStore 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 @@ public class XMLConfigurationStore * @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 @@ public class XMLConfigurationStore 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 @@ public class XMLConfigurationStore }
// update child nodes
- updateNode(currentNode, newPropBuff, properties);
+ updateNode(currentNode, newPropBuff, props);
}
}
}
diff --git a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java index a74afbf..3d4c0ba 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java +++ b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java @@ -247,14 +247,14 @@ public class MclStorageManager * 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 @@ public class MclStorageManager { // 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 @@ public class MclStorageManager 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 @@ public class MclStorageManager 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 class MclStorageManager */ public void storeContactListAndStopStorageManager() { - Object contactListRWLock = getContactListRWLock(); - synchronized (contactListRWLock) + Object contactLstRWLock = getContactListRWLock(); + synchronized (contactLstRWLock) { if (!isStarted()) return; @@ -490,7 +490,7 @@ public class MclStorageManager 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 @@ public class MclStorageManager * 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 @@ public class MclStorageManager * 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 @@ public class MclStorageManager * 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 @@ public class MclStorageManager if (parentGroup == null) { - currentMetaGroup = mclServiceImpl.rootMetaGroup; + currentMetaGroup = mclServImpl.rootMetaGroup; } else { @@ -692,7 +692,7 @@ public class MclStorageManager // 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 @@ public class MclStorageManager // create the proto group ContactGroup newProtoGroup = - mclServiceImpl.loadStoredContactGroup(currentMetaGroup, + mclServImpl.loadStoredContactGroup(currentMetaGroup, protoGroupUID, parentProtoGroup, persistentData, accountID); @@ -830,7 +830,7 @@ public class MclStorageManager } // 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 @@ public class MclStorageManager + ". 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 @@ public class MclStorageManager try { - processGroupXmlNode(mclServiceImpl, accountID, + processGroupXmlNode(mclServImpl, accountID, (Element) currentGroupNode, currentMetaGroup, protoGroupsMap); } @@ -895,8 +894,7 @@ public class MclStorageManager + ". 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 { diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java index 853a057..83d33bf 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java @@ -363,14 +363,14 @@ public class MetaContactGroupImpl * 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 @@ public class MetaContactGroupImpl { ContactGroup group = encapsulatedGroups.next(); - if (group.getGroupName().equals(groupName) + if (group.getGroupName().equals(grpName) && group.getProtocolProvider() == ownerProvider) { return group; @@ -403,7 +403,7 @@ public class MetaContactGroupImpl 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 @@ public class MetaContactGroupImpl if(group.getProtocolProvider() == provider) { - protoGroups.add(group); + protGroups.add(group); } } - return protoGroups.iterator(); + return protGroups.iterator(); } /** @@ -437,7 +437,7 @@ public class MetaContactGroupImpl 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 @@ public class MetaContactGroupImpl if(group.getProtocolProvider().getAccountID() .getAccountUniqueID().equals(accountID)) { - protoGroups.add(group); + protGroups.add(group); } } - return protoGroups.iterator(); + return protGroups.iterator(); } /** @@ -680,11 +680,11 @@ public class MetaContactGroupImpl /** * 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 @@ public class MetaContactGroupImpl { MetaContactGroup mcGroup = groupsIter.next(); - if(mcGroup.getGroupName().equals(groupName)) + if(mcGroup.getGroupName().equals(grpName)) return mcGroup; } @@ -702,11 +702,11 @@ public class MetaContactGroupImpl /** * 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 @@ public class MetaContactGroupImpl { MetaContactGroup mcGroup = groupsIter.next(); - if(mcGroup.getMetaUID().equals(groupUID)) + if(mcGroup.getMetaUID().equals(grpUID)) return mcGroup; } diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java index b3f6204..b3e39f1 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java @@ -801,15 +801,15 @@ public class MetaContactImpl * 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; } } diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java index c56d0fd..abe2849 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java @@ -901,7 +901,7 @@ public class MetaContactListServiceImpl //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 @@ public class MetaContactListServiceImpl { /** @todo handle non persistent presence operation sets */ } - - opSetPresence.moveContactToGroup(protoContact, protoGroup); + else + { + opSetPresence.moveContactToGroup(protoContact, protoGroup); + } } } catch (Exception ex) @@ -1158,7 +1160,7 @@ public class MetaContactListServiceImpl MetaContactGroupImpl parentMetaGroup = (MetaContactGroupImpl) - findParentMetaContactGroup( (MetaContactGroupImpl) groupToRemove); + findParentMetaContactGroup(groupToRemove); parentMetaGroup.removeSubgroup(groupToRemove); @@ -2949,13 +2951,13 @@ public class MetaContactListServiceImpl * @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 @@ public class MetaContactListServiceImpl * 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 @@ public class MetaContactListServiceImpl * 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 @@ public class MetaContactListServiceImpl /** * 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 @@ public class MetaContactListServiceImpl /** * 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 @@ public class MetaContactListServiceImpl * 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 @@ public class MetaContactListServiceImpl * 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) {} /** diff --git a/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java b/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java index 31346ac..e4670ad 100644 --- a/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java +++ b/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java @@ -61,7 +61,7 @@ public class GrowlNotificationActivator } } - public void stop(BundleContext bundleContext) throws Exception + public void stop(BundleContext bContext) throws Exception { logger.info("Growl Notification Service ...[Stopped]"); } diff --git a/src/net/java/sip/communicator/impl/gui/GuiActivator.java b/src/net/java/sip/communicator/impl/gui/GuiActivator.java index 58bcba7..1bc6de6 100644 --- a/src/net/java/sip/communicator/impl/gui/GuiActivator.java +++ b/src/net/java/sip/communicator/impl/gui/GuiActivator.java @@ -69,11 +69,11 @@ public class GuiActivator implements BundleActivator * * @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 @@ public class GuiActivator implements BundleActivator * 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 @@ public class GuiActivator implements BundleActivator GuiActivator.getConfigurationService() .removePropertyChangeListener(uiService); - bundleContext.removeServiceListener(uiService); - bundleContext.removeServiceListener(notificationServiceListener); + bContext.removeServiceListener(uiService); + bContext.removeServiceListener(notificationServiceListener); } /** @@ -152,17 +152,19 @@ public class GuiActivator implements BundleActivator 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; } diff --git a/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java b/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java index 2d44a1b..44e03ac 100644 --- a/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java +++ b/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java @@ -34,9 +34,9 @@ public class PopupDialogImpl * * @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 @@ public class PopupDialogImpl * @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 @@ public class PopupDialogImpl * 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 @@ public class PopupDialogImpl * 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 @@ public class PopupDialogImpl * @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) + public Object showInputPopupDialog(Object mesg, String title, + int mesgType, Object[] selectionVal, + Object initialSelectionVal, byte[] icn) { - return showInputDialog(null, message, title, - popupDialog2JOptionPaneMessageType(messageType), - createImageIcon(icon), selectionValues, initialSelectionValue); + return showInputDialog(null, mesg, title, + popupDialog2JOptionPaneMessageType(mesgType), + createImageIcon(icn), selectionVal, initialSelectionVal); } private static ImageIcon createImageIcon(byte[] icon) @@ -145,9 +145,9 @@ public class PopupDialogImpl * * @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 @@ public class PopupDialogImpl * @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 @@ public class PopupDialogImpl * 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 @@ public class PopupDialogImpl * * @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 @@ public class PopupDialogImpl * @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 @@ public class PopupDialogImpl * 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 @@ public class PopupDialogImpl * 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)); } /** diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java b/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java index ad79e8b..debdb9d 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java @@ -18,6 +18,8 @@ import javax.swing.*; */ public class BoxPopupMenu extends JPopupMenu { + private static final long serialVersionUID = -8488327445916201464L; + private int itemsCount; private int gridRowCount = 0; diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java index 668a962..2c3c5a9 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java @@ -33,6 +33,8 @@ public class ErrorDialog 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 class ErrorDialog public static final int WARNING = 1; - public static final int ERROR = 0; - /** * The maximum width that we allow message dialogs to have. */ diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java index 56357a4..429ff7c 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java @@ -20,6 +20,8 @@ public class ExtListCellRenderer extends JPanel implements ListCellRenderer { + + private static final long serialVersionUID = 1L; private final JLabel label = new JLabel(); private boolean isSelected; @@ -34,10 +36,10 @@ public class ExtListCellRenderer * 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; } diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java index 0fe9621..4400d60 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java @@ -27,10 +27,10 @@ public class ExtendedTableModel extends DefaultTableModel */ 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; diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java b/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java index c20409c..2bcacd0 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/MessageDialog.java @@ -29,6 +29,8 @@ public class MessageDialog extends SIPCommDialog implements ActionListener { + private static final long serialVersionUID = 1L; + private JButton cancelButton = new JButton( GuiActivator.getResources().getI18NString("service.gui.CANCEL")); diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java b/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java index 809e7a1..89e3566 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonCellEditor.java @@ -15,6 +15,7 @@ public class RadioButtonCellEditor extends DefaultCellEditor implements ItemListener { + private static final long serialVersionUID = 1L; private JRadioButton button; public RadioButtonCellEditor(JCheckBox checkBox) diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java index 1a2af0e..d1d4473 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java @@ -46,6 +46,8 @@ public class SCScrollPane private static class SCViewport extends JViewport { + private static final long serialVersionUID = 1L; + private final BufferedImage bgImage; private final Color color; diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java index 5d3ec15..31e3393 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java @@ -22,6 +22,7 @@ import javax.swing.*; public class SIPCommMenu extends JMenu { + private static final long serialVersionUID = 1L; private Object selectedObject; /** @@ -62,11 +63,11 @@ public class SIPCommMenu * @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); } diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java b/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java index b7f9d78..a088a3d 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java @@ -18,6 +18,8 @@ import net.java.sip.communicator.util.*; 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(); diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java b/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java index 84c4347..d0938c6 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java @@ -22,6 +22,8 @@ import net.java.sip.communicator.util.swing.*; 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); diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java b/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java index a80bc49..09db7db 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java @@ -39,6 +39,8 @@ import net.java.sip.communicator.util.swing.*; * @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 class TransparentBackground extends JComponent { 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; } /** |