mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-29 17:52:06 +01:00
Remove ServiceDiscoveryManager.getFeaturesList()
The method was redundant, getFeatures() did already return a copy of the features. There is also no need to make it an unmodifiable List.
This commit is contained in:
parent
ed313c9629
commit
fadef7d1bf
2 changed files with 5 additions and 13 deletions
|
@ -478,7 +478,7 @@ public class EntityCapsManager extends Manager {
|
||||||
|
|
||||||
final List<Identity> identities = new LinkedList<Identity>(ServiceDiscoveryManager.getInstanceFor(connection).getIdentities());
|
final List<Identity> identities = new LinkedList<Identity>(ServiceDiscoveryManager.getInstanceFor(connection).getIdentities());
|
||||||
sdm.setNodeInformationProvider(entityNode + '#' + currentCapsVersion, new AbstractNodeInformationProvider() {
|
sdm.setNodeInformationProvider(entityNode + '#' + currentCapsVersion, new AbstractNodeInformationProvider() {
|
||||||
List<String> features = sdm.getFeaturesList();
|
List<String> features = sdm.getFeatures();
|
||||||
List<PacketExtension> packetExtensions = sdm.getExtendedInfoAsList();
|
List<PacketExtension> packetExtensions = sdm.getExtendedInfoAsList();
|
||||||
@Override
|
@Override
|
||||||
public List<String> getNodeFeatures() {
|
public List<String> getNodeFeatures() {
|
||||||
|
|
|
@ -357,23 +357,15 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the supported features by this XMPP entity.
|
* Returns the supported features by this XMPP entity.
|
||||||
|
* <p>
|
||||||
|
* The result is a copied modifiable list of the original features.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @return a List of the supported features by this XMPP entity.
|
* @return a List of the supported features by this XMPP entity.
|
||||||
*/
|
*/
|
||||||
public List<String> getFeatures() {
|
public List<String> getFeatures() {
|
||||||
synchronized (features) {
|
synchronized (features) {
|
||||||
return Collections.unmodifiableList(new ArrayList<String>(features));
|
return new ArrayList<String>(features);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the supported features by this XMPP entity.
|
|
||||||
*
|
|
||||||
* @return a copy of the List on the supported features by this XMPP entity.
|
|
||||||
*/
|
|
||||||
public List<String> getFeaturesList() {
|
|
||||||
synchronized (features) {
|
|
||||||
return new LinkedList<String>(features);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue