6

In the Android studio whenever I proceed with TextUtils.isEmpty check, the lint shows the argument might be null. It doesn't make sense as isEmpty will check for nullability.

enter image description here

Is there any way to resolve this issue without using asserts.

P.S. ImageUtils.getWidth accepts aspectRatio as null hence no lint warning there.

adnaan.zohran
  • 809
  • 9
  • 21
  • maybe your dynamicImageUrl is always null – Walid Apr 11 '19 at 15:17
  • 4
    I think this broke recently in Android Studio. I remember that TextUtils.isEmpty() was considered a null check until recently, and the timestamp on [this answer](https://stackoverflow.com/a/53652618/324625) implies that was the case. – Steve Blackwell Jun 19 '19 at 15:34

0 Answers0