1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Put the AccountManager in getInstance() in the map

thereby following the code guidelines.
This commit is contained in:
Florian Schmaus 2014-08-11 21:08:02 +02:00
parent 0c0737942c
commit 7caf413637

View file

@ -46,8 +46,10 @@ public class AccountManager extends Manager {
*/
public static synchronized AccountManager getInstance(XMPPConnection connection) {
AccountManager accountManager = INSTANCES.get(connection);
if (accountManager == null)
if (accountManager == null) {
accountManager = new AccountManager(connection);
INSTANCES.put(connection, accountManager);
}
return accountManager;
}
@ -68,7 +70,6 @@ public class AccountManager extends Manager {
*/
private AccountManager(XMPPConnection connection) {
super(connection);
INSTANCES.put(connection, this);
}
/**