mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 23:42:06 +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) {
|
private ServiceDiscoveryManager(XMPPConnection connection) {
|
||||||
super(connection);
|
super(connection);
|
||||||
// Register the new instance and associate it with the connection
|
|
||||||
instances.put(connection, this);
|
|
||||||
|
|
||||||
addFeature(DiscoverInfo.NAMESPACE);
|
addFeature(DiscoverInfo.NAMESPACE);
|
||||||
addFeature(DiscoverItems.NAMESPACE);
|
addFeature(DiscoverItems.NAMESPACE);
|
||||||
|
@ -293,6 +291,8 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
ServiceDiscoveryManager sdm = instances.get(connection);
|
ServiceDiscoveryManager sdm = instances.get(connection);
|
||||||
if (sdm == null) {
|
if (sdm == null) {
|
||||||
sdm = new ServiceDiscoveryManager(connection);
|
sdm = new ServiceDiscoveryManager(connection);
|
||||||
|
// Register the new instance and associate it with the connection
|
||||||
|
instances.put(connection, sdm);
|
||||||
}
|
}
|
||||||
return sdm;
|
return sdm;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue