Existing rule squid:S2637 cares about
- org.apache.commons.lang.StringUtils.isEmpty - https://jira.sonarsource.com/browse/SONARJAVA-2117
- org.apache.commons.lang3.StringUtils.isEmpty - https://jira.sonarsource.com/browse/SONARJAVA-2070
In Android SDK there is similar method [android.text.TextUtils.isEmpty](https://developer.android.com/reference/android/text/TextUtils#isEmpty(java.lang.CharSequence))
which I propose to add and check also
Code example
import android.text.TextUtils;
...
public void test(String param1) {
if (TextUtils.isEmpty(param1)) {
return;
}
System.out.println(param1.length()); // currently it's false positive, after fix it must not warn
}
Type: Code Smell