mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
[disco] Add DisocverInfo.nullSafeContainsFuture(DiscoverInfo, CharSequence)
This commit is contained in:
parent
1564b98d60
commit
49ad8c0954
1 changed files with 8 additions and 0 deletions
|
@ -258,6 +258,14 @@ public class DiscoverInfo extends IQ implements DiscoverInfoView {
|
|||
return features.contains(new Feature(feature));
|
||||
}
|
||||
|
||||
public static boolean nullSafeContainsFeature(DiscoverInfo discoverInfo, CharSequence feature) {
|
||||
if (discoverInfo == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return discoverInfo.containsFeature(feature);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) {
|
||||
xml.optAttribute("node", getNode());
|
||||
|
|
Loading…
Reference in a new issue