aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Ivov <emcho@jitsi.org>2006-08-08 08:26:30 +0000
committerEmil Ivov <emcho@jitsi.org>2006-08-08 08:26:30 +0000
commit425376f94e473d2d3a55d17651438a60b498b785 (patch)
tree0d2a8459a96d981005686aee7ac2043ff013396d /src
parent38ac7a8791c82fdb21b5d21fc239db0fc311629a (diff)
downloadjitsi-425376f94e473d2d3a55d17651438a60b498b785.zip
jitsi-425376f94e473d2d3a55d17651438a60b498b785.tar.gz
jitsi-425376f94e473d2d3a55d17651438a60b498b785.tar.bz2
Throw an exception when installing a duplicate account.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
index 7971d57..9e04aeb 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
@@ -98,6 +98,11 @@ public class ProtocolProviderFactoryIcqImpl
AccountID accountID = new IcqAccountID(userIDStr, accountProperties);
+ //make sure we haven't seen this account id before.
+ if( registeredAccounts.containsKey(accountID) )
+ throw new IllegalStateException(
+ "An account for id " + userIDStr + " was already installed!");
+
//first store the account and only then load it as the load generates
//an osgi event, the osgi event triggers (trhgough the UI) a call to
//the register() method and it needs to acces the configuration service
@@ -132,11 +137,6 @@ public class ProtocolProviderFactoryIcqImpl
AccountID accountID = new IcqAccountID(userIDStr, accountProperties);
- //make sure we haven't seen this account id before.
- if( registeredAccounts.containsKey(accountID) )
- throw new IllegalStateException(
- "An account for id " + userIDStr + " was already installed!");
-
//get a reference to the configuration service and register whatever
//properties we have in it.