diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2008-12-16 12:53:28 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2008-12-16 12:53:28 +0000 |
commit | d02eba788a62f9a5e12c0a3e5324c9024b1606c7 (patch) | |
tree | 2328fc9b722d8cdf6bcdaa24294839f85067d8b2 /src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java | |
parent | 6df051d5c9aca787c36696a6e4537635db6f6e75 (diff) | |
download | jitsi-d02eba788a62f9a5e12c0a3e5324c9024b1606c7.zip jitsi-d02eba788a62f9a5e12c0a3e5324c9024b1606c7.tar.gz jitsi-d02eba788a62f9a5e12c0a3e5324c9024b1606c7.tar.bz2 |
- Reduces garbage created when working with AccoutID.getAccountProperties() which creates a copy of the internal Hashtable by introducing getAccountProperty(), getAccountPropertyString(), getAccountPropertyBoolean() and getAccountPropertyInt(). The last two also carry out the conversions between Object and boolean/int without additional allocations in contrast to most of the previous uses which would perform allocations.
- Modifies SimpleStatusMenu to load its necessary image once instead of three times and to spare a ImageIcon instance.
Diffstat (limited to 'src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java')
-rw-r--r-- | src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java index b53e50c..e81805d 100644 --- a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java +++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java @@ -6,7 +6,6 @@ package net.java.sip.communicator.plugin.msnaccregwizz; import java.awt.*; -import java.util.*; import javax.swing.*; import javax.swing.event.*; @@ -272,8 +271,8 @@ public class FirstWizardPage { AccountID accountID = protocolProvider.getAccountID(); String password = - (String) accountID.getAccountProperties().get( - ProtocolProviderFactory.PASSWORD); + accountID + .getAccountPropertyString(ProtocolProviderFactory.PASSWORD); this.uinField.setText(accountID.getUserID()); @@ -289,12 +288,8 @@ public class FirstWizardPage ProtocolProviderFactory factory = MsnAccRegWizzActivator.getMsnProtocolProviderFactory(); - ArrayList registeredAccounts = factory.getRegisteredAccounts(); - - for (int i = 0; i < registeredAccounts.size(); i++) + for (AccountID accountID : factory.getRegisteredAccounts()) { - AccountID accountID = (AccountID) registeredAccounts.get(i); - if (accountName.equalsIgnoreCase(accountID.getUserID())) return true; } |