();
private boolean isResolved = false;
@@ -71,7 +71,7 @@ public class ContactGroupIcqImpl
* to directly compare ( == ) instances of buddies we've stored and others
* that are returned by the framework.
*
- * @param joustSimGroup the JoustSIM Group correspoinding to the group
+ * @param joustSimGroup the JoustSIM Group corresponding to the group
* @param groupMembers the group members that we should add to the group.
* @param ssclCallback a callback to the server stored contact list
* we're creating.
@@ -153,16 +153,25 @@ void addContact(ContactIcqImpl contact)
*/
void removeContact(ContactIcqImpl contact)
{
- buddies.remove(contact);
+ for (Iterator> buddyIter
+ = buddies.entrySet().iterator();
+ buddyIter.hasNext();)
+ {
+ if (buddyIter.next().getKey().equals(contact))
+ {
+ buddyIter.remove();
+ break;
+ }
+ }
}
/**
* Returns an Iterator over all contacts, member of this
* ContactGroup.
- *
+ *
* @return a java.util.Iterator over all contacts inside this
- * ContactGroup. In case the group doesn't contain any
- * memebers it will return an empty iterator.
+ * ContactGroup. In case the group doesn't contain any
+ * members it will return an empty iterator.
*/
public Iterator contacts()
{
@@ -368,7 +377,7 @@ int findContactIndex(Contact contact)
/**
- * Returns the icq contact encapsulating with the spcieified screen name or
+ * Returns the icq contact encapsulating with the specified screen name or
* null if no such contact was found.
*
* @param screenName the screenName (or icq UIN) for the contact we're
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
index 3fca252c6..a1e13c53d 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
@@ -1657,9 +1657,16 @@ public boolean authorizationRequired(Screenname screenname, Group parentGroup)
((ContactGroupIcqImpl)parent).removeContact(srcContact);
theAwaitingAuthorizationGroup.addContact(srcContact);
- Object lock = new Object();
- synchronized(lock){
- try{ lock.wait(500); }catch(Exception e){}
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException ex)
+ {
+ /*
+ * I don't know why the exception is ignored, I just fixed
+ * an incorrect use of Object.wait(long).
+ */
}
fireSubscriptionMovedEvent(srcContact,
diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
index 98db15d82..7419c5e43 100644
--- a/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
@@ -14,6 +14,7 @@
import java.awt.*;
import java.awt.event.*;
+
import javax.swing.*;
import javax.swing.event.*;
@@ -243,15 +244,15 @@ public void actionPerformed(ActionEvent event)
/**
* Fills the Account ID, Identity File and Known Hosts File fields in this
- * panel with the data comming from the given protocolProvider.
+ * panel with the data coming from the given protocolProvider.
*
* @param protocolProvider The ProtocolProviderService to load the
* data from.
*/
public void loadAccount(ProtocolProviderService protocolProvider)
{
- ProtocolProviderFactorySSH protocolProviderSSH =
- (ProtocolProviderFactorySSH)protocolProvider;
+ if (!(protocolProvider instanceof ProtocolProviderServiceSSHImpl))
+ throw new ClassCastException("protocolProvider");
AccountID accountID = protocolProvider.getAccountID();