TextUtils.isEmpty checks for null but lint doesn't recognise

天大地大妈咪最大 提交于 2021-01-27 14:30:11

问题


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.

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

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

来源:https://stackoverflow.com/questions/55635564/textutils-isempty-checks-for-null-but-lint-doesnt-recognise

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!