https://kotlinlang.org logo
#android
Title
# android
t

tateisu

01/10/2018, 3:16 PM
I think it would be useful if the kotlin converter replaces 「if(!TextUtils.isEmpty(s))」 with 「 if(s?.isNotEmpty()==true)」. (also inverted conditions are 「if(TextUtils.isEmpty(s))」 with 「if( s?.isEmpty()!=false) 」.) Because the latter performs a null check and safe cast.
👍 1
a

adam-mcneilly

01/10/2018, 3:18 PM
+1 to that idea - I just manually changed this on a project recently. You should create a feature request (if you can't find one already) - https://youtrack.jetbrains.com/issues/KT
t

tateisu

01/10/2018, 3:30 PM
seems there is no similar issues, I've post https://youtrack.jetbrains.com/issue/KT-22216
🎉 3