1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

SMACK-541 Fix of XHTMLExtensionProvider on Android

This fixes issue there on android in XHTMLExtension bodys contained "null" instead of actual xhtml tags
This happened due to difference in XPP implementation in KXmlPullParser (on Android) MXParser (in other cases)
This fix replaces usage of getText method of XPP with restoration of xhtml tags using XPP api.
This commit is contained in:
Vyacheslav Blinov 2014-03-06 12:42:25 +04:00 committed by Florian Schmaus
parent 585e20e93e
commit 06f88674ee
4 changed files with 168 additions and 47 deletions

View file

@ -570,4 +570,18 @@ public class StringUtils {
return new String(randBuffer);
}
/**
* Returns true if string is not null and is not empty, false otherwise
* Examples:
* isNotEmpty(null) - false
* isNotEmpty("") - false
* isNotEmpty(" ") - true
* isNotEmpty("empty") - true
*
* @param string checked String
* @return true if string is not null and is not empty, false otherwise
*/
public static boolean isNotEmpty(CharSequence string) {
return string != null && string.length() != 0;
}
}