Annotate the parameter in TextUtils#isEmpty() as @Nullable
Change-Id: Iaccf7f568952399d5eb48c15a5428317dd75052a
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.text;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -457,7 +458,7 @@ public class TextUtils {
|
||||
* @param str the string to be examined
|
||||
* @return true if str is null or zero length
|
||||
*/
|
||||
public static boolean isEmpty(CharSequence str) {
|
||||
public static boolean isEmpty(@Nullable CharSequence str) {
|
||||
if (str == null || str.length() == 0)
|
||||
return true;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user