diff options
author | Werner Dittmann <wernerd@java.net> | 2009-04-20 15:32:04 +0000 |
---|---|---|
committer | Werner Dittmann <wernerd@java.net> | 2009-04-20 15:32:04 +0000 |
commit | 4882fb691ce55c154ee0698c79240ba1574778f9 (patch) | |
tree | 9d1831abb863d513226725d26d911a1ec0f1b6ed /src/net/java/sip/communicator/impl | |
parent | 2af15f779d7a323392e4416ffcfeae0f9a0a64e8 (diff) | |
download | jitsi-4882fb691ce55c154ee0698c79240ba1574778f9.zip jitsi-4882fb691ce55c154ee0698c79240ba1574778f9.tar.gz jitsi-4882fb691ce55c154ee0698c79240ba1574778f9.tar.bz2 |
Fix warning: raw types, unused variables, etc. Contributes to issue #637.
Diffstat (limited to 'src/net/java/sip/communicator/impl')
19 files changed, 82 insertions, 91 deletions
diff --git a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java index 932f88b..55ad070 100644 --- a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java +++ b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java @@ -2179,8 +2179,7 @@ public class CallSessionImpl // The crypto provider solution should be queried somehow // or taken from a resources file TransformConnector transConnector - = TransformManager.createZRTPConnector( - bindAddress, this); + = TransformManager.createZRTPConnector(bindAddress); rtpManager.initialize(transConnector); this.transConnectors.put(rtpManager, transConnector); diff --git a/src/net/java/sip/communicator/impl/media/protocol/alsa/DataSource.java b/src/net/java/sip/communicator/impl/media/protocol/alsa/DataSource.java index b42aaea..52d3bbd 100644 --- a/src/net/java/sip/communicator/impl/media/protocol/alsa/DataSource.java +++ b/src/net/java/sip/communicator/impl/media/protocol/alsa/DataSource.java @@ -103,7 +103,7 @@ public class DataSource */ public Object getControl(String controlType) { try { - Class cls = Class.forName(controlType); + Class<?> cls = Class.forName(controlType); Object cs[] = getControls(); for (int i = 0; i < cs.length; i++) { if (cls.isInstance(cs[i])) diff --git a/src/net/java/sip/communicator/impl/media/transform/TransformManager.java b/src/net/java/sip/communicator/impl/media/transform/TransformManager.java index d24771c..865297b 100755 --- a/src/net/java/sip/communicator/impl/media/transform/TransformManager.java +++ b/src/net/java/sip/communicator/impl/media/transform/TransformManager.java @@ -11,8 +11,6 @@ import javax.media.rtp.*; import net.java.sip.communicator.impl.media.transform.dummy.*;
import net.java.sip.communicator.impl.media.transform.srtp.*;
import net.java.sip.communicator.impl.media.transform.zrtp.*;
-import net.java.sip.communicator.service.media.*;
-import net.java.sip.communicator.util.*;
/**
* TransformManager class encapsulate the logic of creating different kinds of
@@ -24,8 +22,8 @@ import net.java.sip.communicator.util.*; */
public class TransformManager
{
- private static final Logger logger
- = Logger.getLogger(TransformManager.class);
+// private static final Logger logger
+// = Logger.getLogger(TransformManager.class);
/**
* Create a SRTP TransformConnector, which will provide SRTP encryption /
@@ -70,8 +68,7 @@ public class TransformManager * @return the TransformConnector used for ZRTP processing
* @throws InvalidSessionAddressException
*/
- public static TransformConnector createZRTPConnector(SessionAddress addr,
- CallSession callSession)
+ public static TransformConnector createZRTPConnector(SessionAddress addr)
throws InvalidSessionAddressException
{
ZRTPTransformEngine engine = new ZRTPTransformEngine();
diff --git a/src/net/java/sip/communicator/impl/media/transform/TransformOutputStream.java b/src/net/java/sip/communicator/impl/media/transform/TransformOutputStream.java index 8f7f7c5..031c0e4 100755 --- a/src/net/java/sip/communicator/impl/media/transform/TransformOutputStream.java +++ b/src/net/java/sip/communicator/impl/media/transform/TransformOutputStream.java @@ -119,10 +119,8 @@ public class TransformOutputStream for (int i = 0; i < this.remoteAddrs.size(); ++i)
{
- InetAddress remoteAddr =
- (InetAddress) this.remoteAddrs.elementAt(i);
- int remotePort =
- ((Integer) this.remotePorts.elementAt(i)).intValue();
+ InetAddress remoteAddr = this.remoteAddrs.elementAt(i);
+ int remotePort = (this.remotePorts.elementAt(i)).intValue();
try
{
diff --git a/src/net/java/sip/communicator/impl/media/transform/srtp/PacketManipulator.java b/src/net/java/sip/communicator/impl/media/transform/srtp/PacketManipulator.java index 52892e2..3cfeb50 100755 --- a/src/net/java/sip/communicator/impl/media/transform/srtp/PacketManipulator.java +++ b/src/net/java/sip/communicator/impl/media/transform/srtp/PacketManipulator.java @@ -34,7 +34,7 @@ public class PacketManipulator }
else
{
- return (int)pkt.readByte(pkt.getLength() - 1);
+ return pkt.readByte(pkt.getLength() - 1);
}
}
@@ -53,7 +53,7 @@ public class PacketManipulator return -1;
}
- int csrcNum = (int)(pkt.readByte(0) & 0xF);
+ int csrcNum = pkt.readByte(0) & 0xF;
return 12 + 4 * csrcNum;
}
diff --git a/src/net/java/sip/communicator/impl/media/transform/srtp/SRTCPTransformer.java b/src/net/java/sip/communicator/impl/media/transform/srtp/SRTCPTransformer.java index 3ef1127..b81a2b5 100755 --- a/src/net/java/sip/communicator/impl/media/transform/srtp/SRTCPTransformer.java +++ b/src/net/java/sip/communicator/impl/media/transform/srtp/SRTCPTransformer.java @@ -19,7 +19,6 @@ import net.java.sip.communicator.impl.media.transform.*; public class SRTCPTransformer
implements PacketTransformer
{
- private SRTPTransformEngine engine;
/**
* Constructs a SRTCPTransformer object
@@ -28,7 +27,6 @@ public class SRTCPTransformer */
public SRTCPTransformer(SRTPTransformEngine engine)
{
- this.engine = engine;
}
/**
diff --git a/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPCryptoContext.java b/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPCryptoContext.java index 0b0daf8..0977b43 100755 --- a/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPCryptoContext.java +++ b/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPCryptoContext.java @@ -427,8 +427,8 @@ public class SRTPCryptoContext */
public void processPacketAESCM(RawPacket pkt) {
long ssrc = PacketManipulator.GetRTPSSRC(pkt);
- int seqNum = PacketManipulator.GetRTPSequenceNumber(pkt);
- long index = ((long) this.roc << 16) | (long) seqNum;
+ int seqNo = PacketManipulator.GetRTPSequenceNumber(pkt);
+ long index = ((long) this.roc << 16) | seqNo;
// byte[] iv = new byte[16];
ivStore[0] = saltKey[0];
@@ -508,7 +508,7 @@ public class SRTPCryptoContext * Sequence Number is guaranteed to be real (not faked) through
* authentication.
*
- * @param seqNum sequence number of the packet
+ * @param seqNo sequence number of the packet
* @return true if this sequence number indicates the packet is not a
* replayed one, false if not
*/
diff --git a/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPTransformer.java b/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPTransformer.java index f35d723..f95fce9 100755 --- a/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPTransformer.java +++ b/src/net/java/sip/communicator/impl/media/transform/srtp/SRTPTransformer.java @@ -72,8 +72,7 @@ public class SRTPTransformer {
long ssrc = PacketManipulator.GetRTPSSRC(pkt);
- SRTPCryptoContext context =
- (SRTPCryptoContext) this.contexts.get(ssrc);
+ SRTPCryptoContext context = this.contexts.get(ssrc);
if (context == null)
{
@@ -101,8 +100,7 @@ public class SRTPTransformer {
long ssrc = PacketManipulator.GetRTPSSRC(pkt);
int seqNum = PacketManipulator.GetRTPSequenceNumber(pkt);
- SRTPCryptoContext context =
- (SRTPCryptoContext) this.contexts.get(ssrc);
+ SRTPCryptoContext context = this.contexts.get(ssrc);
if (context == null)
{
diff --git a/src/net/java/sip/communicator/impl/netaddr/AddressDiagnosticsKit.java b/src/net/java/sip/communicator/impl/netaddr/AddressDiagnosticsKit.java index e24051f..918d3ef 100644 --- a/src/net/java/sip/communicator/impl/netaddr/AddressDiagnosticsKit.java +++ b/src/net/java/sip/communicator/impl/netaddr/AddressDiagnosticsKit.java @@ -40,8 +40,9 @@ public class AddressDiagnosticsKit * fails and are only usable with other boxes using the same address * in the same net segment. That's why they get their low preference. */ - private static final AddressPreference ADDR_PREF_LOCAL_IPV4_AUTOCONF - = new AddressPreference(40); + // TODO Remove after confirmation that this not used +// private static final AddressPreference ADDR_PREF_LOCAL_IPV4_AUTOCONF +// = new AddressPreference(40); /** * Local IPv6 addresses are assigned by default to any network iface running @@ -135,7 +136,7 @@ public class AddressDiagnosticsKit //implements the algorithm from AssigningAddressPreferences.png - setDiagnosticsStatus(this.DIAGNOSTICS_STATUS_DISOVERING_CONFIG); + setDiagnosticsStatus(DIAGNOSTICS_STATUS_DISOVERING_CONFIG); InetAddress address = addressEntry.getInetAddress(); diff --git a/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java b/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java index f2bcc9b..6ce6769 100644 --- a/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java +++ b/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java @@ -10,7 +10,7 @@ package net.java.sip.communicator.impl.netaddr; * @author Emil Ivov */ public class AddressPreference - implements Comparable + implements Comparable<AddressPreference> { public static final int MAX_PREF = 100; public static final int MIN_PREF = 0; @@ -73,11 +73,9 @@ public class AddressPreference * @throws ClassCastException if the specified object's type is not an * instance or a descendant of AddressPreference. */ - public int compareTo(Object o) + public int compareTo(AddressPreference o) { - AddressPreference other = (AddressPreference)o; - - return this.preference - other.preference; + return this.preference - o.preference; } /** @@ -91,8 +89,7 @@ public class AddressPreference */ public boolean equals(Object obj) { - if (! (obj instanceof AddressPreference) - || obj == null) + if (! (obj instanceof AddressPreference)) return false; if (obj == this diff --git a/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java b/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java index 7847366..1a585d6 100644 --- a/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java +++ b/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java @@ -47,7 +47,7 @@ public class NetaddrActivator //end ugly property set //keep a reference to the bundle context for later usage. - this.bundleContext = bundleContext; + NetaddrActivator.bundleContext = bundleContext; //Create and start the network address manager. networkAMS = diff --git a/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java b/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java index a94a51f..57d6f99 100644 --- a/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java +++ b/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java @@ -97,7 +97,8 @@ public class NetworkAddressManagerServiceImpl * <br> * {@link http://ietf.org/rfc/rfc3927.txt} */ - private static final String DYNAMIC_CONF_FOR_IPV4_ADDR_PREFIX = "169.254"; + // TODO Remove after confirmation that it is not used +// private static final String DYNAMIC_CONF_FOR_IPV4_ADDR_PREFIX = "169.254"; /** * The name of the property containing the number of binds that we should diff --git a/src/net/java/sip/communicator/impl/notification/EventNotification.java b/src/net/java/sip/communicator/impl/notification/EventNotification.java index 147daf2..f61b948 100644 --- a/src/net/java/sip/communicator/impl/notification/EventNotification.java +++ b/src/net/java/sip/communicator/impl/notification/EventNotification.java @@ -32,7 +32,7 @@ public class EventNotification * Contains all actions which will be executed when this event notification * is fired. */ - private final Hashtable actionsTable = new Hashtable(); + private final Hashtable<String, Action> actionsTable = new Hashtable<String, Action>(); /** * Creates an instance of <tt>EventNotification</tt> by specifying the @@ -79,7 +79,7 @@ public class EventNotification * * @return the set of actions registered for this event notification */ - public Map getActions() + public Map<String, Action> getActions() { return actionsTable; } @@ -95,7 +95,7 @@ public class EventNotification */ public Action getAction(String actionType) { - return (Action) actionsTable.get(actionType); + return actionsTable.get(actionType); } /** diff --git a/src/net/java/sip/communicator/impl/notification/NotificationServiceImpl.java b/src/net/java/sip/communicator/impl/notification/NotificationServiceImpl.java index c639eab..5d25742 100644 --- a/src/net/java/sip/communicator/impl/notification/NotificationServiceImpl.java +++ b/src/net/java/sip/communicator/impl/notification/NotificationServiceImpl.java @@ -123,7 +123,7 @@ public class NotificationServiceImpl EventNotification notification = null; if(notificationsTable.containsKey(eventType)) - notification = (EventNotification) notificationsTable.get(eventType); + notification = notificationsTable.get(eventType); else { notification = new EventNotification(eventType); @@ -236,7 +236,7 @@ public class NotificationServiceImpl String actionType) { EventNotification notification - = (EventNotification) notificationsTable.get(eventType); + = notificationsTable.get(eventType); if(notification == null) return; @@ -271,7 +271,7 @@ public class NotificationServiceImpl * @return an iterator over a list of all events registered in this * notifications service */ - public Iterator getRegisteredEvents() + public Iterator<String> getRegisteredEvents() { return Collections.unmodifiableSet( notificationsTable.keySet()).iterator(); @@ -295,6 +295,8 @@ public class NotificationServiceImpl if(notification == null) return null; + // TODO: cleanup mixed usage of different classes/objects in hashtable + // Cleanup together with NotificationService and NotificationConfigurationPanel Hashtable actions = new Hashtable(); for (Object value : notification.getActions().values()) @@ -324,7 +326,7 @@ public class NotificationServiceImpl String actionType) { EventNotification notification - = (EventNotification) notificationsTable.get(eventType); + = notificationsTable.get(eventType); if(notification == null) return null; @@ -388,16 +390,16 @@ public class NotificationServiceImpl Object tag) { EventNotification notification - = (EventNotification) notificationsTable.get(eventType); + = notificationsTable.get(eventType); if(notification == null || !notification.isActive()) return; - Iterator actions = notification.getActions().values().iterator(); + Iterator<Action> actions = notification.getActions().values().iterator(); while(actions.hasNext()) { - Action action = (Action) actions.next(); + Action action = actions.next(); String actionType = action.getActionType(); @@ -671,7 +673,7 @@ public class NotificationServiceImpl // Load the data in the notifications table. EventNotification notification - = (EventNotification)notificationsTable.get(eventType); + = notificationsTable.get(eventType); if(notification == null) { @@ -733,7 +735,7 @@ public class NotificationServiceImpl public boolean isActive(String eventType) { EventNotification eventNotification - = (EventNotification) notificationsTable.get(eventType); + = notificationsTable.get(eventType); if(eventNotification == null) return false; @@ -803,7 +805,7 @@ public class NotificationServiceImpl for (int i = 0 ; i < changeListeners.size(); i ++) { - listener = (NotificationChangeListener) changeListeners.get(i); + listener = changeListeners.get(i); if (eventType.equals(NotificationActionTypeEvent.ACTION_ADDED)) { @@ -901,7 +903,7 @@ public class NotificationServiceImpl EventNotification notification = null; if(notificationsTable.containsKey(eventType)) - notification = (EventNotification) notificationsTable.get(eventType); + notification = notificationsTable.get(eventType); else { notification = new EventNotification(eventType); @@ -994,7 +996,7 @@ public class NotificationServiceImpl EventNotification notification = null; if(notificationsTable.containsKey(eventType)) - notification = (EventNotification) notificationsTable.get(eventType); + notification = notificationsTable.get(eventType); else { notification = new EventNotification(eventType); @@ -1061,11 +1063,11 @@ public class NotificationServiceImpl { EventNotification notification = notificationsTable.get(eventType); - Vector actionsToRemove = new Vector(notification.getActions().keySet()); - Iterator actionIter = actionsToRemove.iterator(); + Vector<String> actionsToRemove = new Vector<String>(notification.getActions().keySet()); + Iterator<String> actionIter = actionsToRemove.iterator(); while (actionIter.hasNext()) { - String actionType = (String)actionIter.next(); + String actionType = actionIter.next(); removeEventNotificationAction(eventType, actionType); } @@ -1078,10 +1080,10 @@ public class NotificationServiceImpl String eventType = entry.getKey(); EventNotification notification = entry.getValue(); - Iterator actionIter = notification.getActions().keySet().iterator(); + Iterator<String> actionIter = notification.getActions().keySet().iterator(); while (actionIter.hasNext()) { - String actionType = (String)actionIter.next(); + String actionType = actionIter.next(); registerNotificationForEvent( eventType, diff --git a/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java b/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java index 707c0fb..3002fc0 100644 --- a/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java @@ -538,12 +538,12 @@ public class AccountManagerImpl }
// store the rest of the properties
- Map<?, ?> accountProperties = accountID.getAccountProperties();
+ Map<String, String> accountProperties = accountID.getAccountProperties();
- for (Map.Entry entry : accountProperties.entrySet())
+ for (Map.Entry<String, String> entry : accountProperties.entrySet())
{
- String property = (String) entry.getKey();
- String value = (String) entry.getValue();
+ String property = entry.getKey();
+ String value = entry.getValue();
// if this is a password - encode it.
if (property.equals(ProtocolProviderFactory.PASSWORD))
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/ContactGroupDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/ContactGroupDictImpl.java index 35bb1e8..4b6bb94 100644 --- a/src/net/java/sip/communicator/impl/protocol/dict/ContactGroupDictImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/dict/ContactGroupDictImpl.java @@ -203,7 +203,7 @@ public class ContactGroupDictImpl */ public Contact getContact(int index) { - return (ContactDictImpl)contacts.get(index); + return contacts.get(index); } /** diff --git a/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java index 2ad0ab2..898df74 100644 --- a/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java @@ -33,19 +33,22 @@ public class OperationSetPersistentPresenceDictImpl /** * A list of listeners registered for <tt>ServerStoredGroupChangeEvent</tt>s. */ - private Vector serverStoredGroupListeners = new Vector(); + private Vector<ServerStoredGroupListener> serverStoredGroupListeners = + new Vector<ServerStoredGroupListener>(); /** * A list of listeners registered for * <tt>ProviderPresenceStatusChangeEvent</tt>s. */ - private Vector providerPresenceStatusListeners = new Vector(); + private Vector<ProviderPresenceStatusListener> providerPresenceStatusListeners = + new Vector<ProviderPresenceStatusListener>(); /** * A list of listeneres registered for * <tt>ContactPresenceStatusChangeEvent</tt>s. */ - private Vector contactPresenceStatusListeners = new Vector(); + private Vector<ContactPresenceStatusListener> contactPresenceStatusListeners = + new Vector<ContactPresenceStatusListener>(); /** * The root of the dict contact list. @@ -118,17 +121,18 @@ public class OperationSetPersistentPresenceDictImpl = new ContactPresenceStatusChangeEvent(source, parentProvider , parentGroup, oldValue, source.getPresenceStatus()); - Iterator listeners = null; - synchronized(contactPresenceStatusListeners) + Iterator<ContactPresenceStatusListener> listeners = null; + synchronized (contactPresenceStatusListeners) { - listeners = new ArrayList(contactPresenceStatusListeners).iterator(); + listeners = new ArrayList<ContactPresenceStatusListener>( + contactPresenceStatusListeners).iterator(); } while(listeners.hasNext()) { ContactPresenceStatusListener listener - = (ContactPresenceStatusListener)listeners.next(); + = listeners.next(); listener.contactPresenceStatusChanged(evt); } @@ -144,19 +148,18 @@ public class OperationSetPersistentPresenceDictImpl int eventID) { ServerStoredGroupEvent evt = new ServerStoredGroupEvent( - source, eventID, (ContactGroupDictImpl)source.getParentContactGroup() + source, eventID, source.getParentContactGroup() , this.parentProvider, this); - Iterator listeners = null; + Iterator<ServerStoredGroupListener> listeners = null; synchronized (serverStoredGroupListeners) { - listeners = new ArrayList(serverStoredGroupListeners).iterator(); + listeners = new ArrayList<ServerStoredGroupListener>(serverStoredGroupListeners).iterator(); } while (listeners.hasNext()) { - ServerStoredGroupListener listener - = (ServerStoredGroupListener) listeners.next(); + ServerStoredGroupListener listener = listeners.next(); if(eventID == ServerStoredGroupEvent.GROUP_CREATED_EVENT) { @@ -184,16 +187,15 @@ public class OperationSetPersistentPresenceDictImpl = new ProviderPresenceStatusChangeEvent(this.parentProvider, oldValue, this.getPresenceStatus()); - Iterator listeners = null; + Iterator<ProviderPresenceStatusListener> listeners = null; synchronized (providerPresenceStatusListeners) { - listeners = new ArrayList(providerPresenceStatusListeners).iterator(); + listeners = new ArrayList<ProviderPresenceStatusListener>(providerPresenceStatusListeners).iterator(); } while (listeners.hasNext()) { - ProviderPresenceStatusListener listener - = (ProviderPresenceStatusListener) listeners.next(); + ProviderPresenceStatusListener listener = listeners.next(); listener.providerStatusChanged(evt); } @@ -450,9 +452,9 @@ public class OperationSetPersistentPresenceDictImpl //now check whether we are in someone else's contact list and modify //our status there - List contacts = findContactsPointingToUs(); + List<Contact> contacts = findContactsPointingToUs(); - Iterator contactsIter = contacts.iterator(); + Iterator<Contact> contactsIter = contacts.iterator(); while (contactsIter.hasNext()) { ContactDictImpl contact @@ -524,7 +526,7 @@ public class OperationSetPersistentPresenceDictImpl PresenceStatus newStatus) { //first set the status for contacts in this group - Iterator childContacts = parent.contacts(); + Iterator<Contact> childContacts = parent.contacts(); while(childContacts.hasNext()) { @@ -545,11 +547,11 @@ public class OperationSetPersistentPresenceDictImpl } //now call this method recursively for all subgroups - Iterator subgroups = parent.subgroups(); + Iterator<ContactGroup> subgroups = parent.subgroups(); while(subgroups.hasNext()) { - ContactGroup subgroup = (ContactGroup)subgroups.next(); + ContactGroup subgroup = subgroups.next(); changePresenceStatusForAllContacts(subgroup, newStatus); } } @@ -844,7 +846,7 @@ public class OperationSetPersistentPresenceDictImpl parentGroup.removeContact((ContactDictImpl)contact); - fireSubscriptionEvent((ContactDictImpl)contact, + fireSubscriptionEvent(contact, ((ContactDictImpl)contact).getParentContactGroup() , SubscriptionEvent.SUBSCRIPTION_REMOVED); } @@ -971,9 +973,9 @@ public class OperationSetPersistentPresenceDictImpl * @return a list of all contacts in other providers' contact lists that * point to us. */ - public List findContactsPointingToUs() + public List<Contact> findContactsPointingToUs() { - List contacts = new LinkedList(); + List<Contact> contacts = new LinkedList<Contact>(); BundleContext bc = DictActivator.getBundleContext(); String osgiQuery = @@ -1079,14 +1081,14 @@ public class OperationSetPersistentPresenceDictImpl //offline. The icq protocol does not implement top level buddies //nor subgroups for top level groups so a simple nested loop //would be enough. - Iterator groupsIter = getServerStoredContactListRoot() + Iterator<ContactGroup> groupsIter = getServerStoredContactListRoot() .subgroups(); while (groupsIter.hasNext()) { ContactGroupDictImpl group = (ContactGroupDictImpl) groupsIter.next(); - Iterator contactsIter = group.contacts(); + Iterator<Contact> contactsIter = group.contacts(); while (contactsIter.hasNext()) { diff --git a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java index 70fa69b..e226c37 100644 --- a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java @@ -40,7 +40,7 @@ public class ProtocolIconDictImpl * an iterator to a set containing the supported icon sizes. * @return Returns an iterator to a set containing the supported icon sizes */ - public Iterator getSupportedSizes() + public Iterator<String> getSupportedSizes() { return iconsTable.keySet().iterator(); } diff --git a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java index 426f13f..35d507c 100644 --- a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java @@ -114,9 +114,7 @@ public class ProtocolProviderServiceDictImpl //initialize the IM operation set OperationSetBasicInstantMessagingDictImpl basicInstantMessaging = new OperationSetBasicInstantMessagingDictImpl( - this - , (OperationSetPersistentPresenceDictImpl) - persistentPresence); + this, persistentPresence); supportedOperationSets.put( OperationSetBasicInstantMessaging.class.getName(), |