https://kotlinlang.org logo
#intellij
Title
# intellij
s

sreich

07/07/2022, 6:23 PM
i'm trying to get this as an inspection to suggest to replace StringUtils.isEmpty(myvar) with myvar.isEmptyOrNull(). Works great...except, it does not delete the StringUtils part preceding it. Why is this, and how can I fix it so it does?
r

Roukanken

07/08/2022, 8:10 AM
I think the only thing you need to change is the Target if you change it to "whole pattern" (or w/e is there) then it will delete whole thing (and replace with the stuff you wanted) Of course it will also underline whole call until fixed (which is my guess why you have it set to MethodCall), but that shouldn't a big problem, no?
s

sreich

07/08/2022, 12:30 PM
@Roukanken perfect, thank you. that was it
2 Views