Fix nullability of TextUtil methods

This commit is contained in:
Peter Cai 2022-07-31 17:20:25 -04:00
parent 9ca7ac91be
commit a85546b9aa
1 changed files with 3 additions and 3 deletions

View File

@ -107,17 +107,17 @@ object TextUtil {
* TODO: Remove after Kotlin migration
*/
@JvmStatic
fun isNotBlank(str: String): Boolean = str.isNotBlank()
fun isNotBlank(str: String?): Boolean = !isBlank(str)
/*
* TODO: Remove after Kotlin migration
*/
@JvmStatic
fun isBlank(str: String): Boolean = str.isBlank()
fun isBlank(str: String?): Boolean = str?.isBlank() ?: true
/*
* TODO: Remove after Kotlin migration
*/
@JvmStatic
fun isNotEmpty(str: String): Boolean = str.isNotEmpty()
fun isNotEmpty(str: String?): Boolean = str?.isNotEmpty() ?: false
}