Annotate the parameter in TextUtils#isEmpty() as @Nullable

Change-Id: Iaccf7f568952399d5eb48c15a5428317dd75052a
This commit is contained in:
Scott Kennedy
2015-02-19 10:36:12 -08:00
parent 0a7269bbaf
commit 6cd132fef2

View File

@@ -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