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:
parent
585e20e93e
commit
06f88674ee
4 changed files with 168 additions and 47 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue