Merge "Remove unnecessary if-else statement from TextUtils#isEmpty. "
This commit is contained in:
committed by
Android (Google) Code Review
commit
c534f4ca8a
@@ -456,10 +456,7 @@ public class TextUtils {
|
||||
* @return true if str is null or zero length
|
||||
*/
|
||||
public static boolean isEmpty(@Nullable CharSequence str) {
|
||||
if (str == null || str.length() == 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return str == null || str.length() == 0;
|
||||
}
|
||||
|
||||
/** {@hide} */
|
||||
|
||||
Reference in New Issue
Block a user