mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 08:12:05 +01:00
SDM: Follow guidelines, perform put() where get() is performed
This commit is contained in:
parent
5d159c4be2
commit
6af5d5e462
1 changed files with 2 additions and 2 deletions
|
@ -117,8 +117,6 @@ public class ServiceDiscoveryManager extends Manager {
|
|||
*/
|
||||
private ServiceDiscoveryManager(XMPPConnection connection) {
|
||||
super(connection);
|
||||
// Register the new instance and associate it with the connection
|
||||
instances.put(connection, this);
|
||||
|
||||
addFeature(DiscoverInfo.NAMESPACE);
|
||||
addFeature(DiscoverItems.NAMESPACE);
|
||||
|
@ -293,6 +291,8 @@ public class ServiceDiscoveryManager extends Manager {
|
|||
ServiceDiscoveryManager sdm = instances.get(connection);
|
||||
if (sdm == null) {
|
||||
sdm = new ServiceDiscoveryManager(connection);
|
||||
// Register the new instance and associate it with the connection
|
||||
instances.put(connection, sdm);
|
||||
}
|
||||
return sdm;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue