Join Slack
what does it mean when I get just 1 JSON object in my response and doing `firstOrNull` or `find` on ...
# android
o
oday
12/11/2020, 1:00 PM
what does it mean when I get just 1 JSON object in my response and doing
firstOrNull
or
find
on it produces exception index out of bounds?
v
Vampire
12/11/2020, 1:18 PM
Attach a debugger and find out why it is not behaving as you expect by inspecting the situation. ๐
o
oday
12/11/2020, 1:18 PM
yea I thought so, it just doesnt make sense to be like that
oday
12/11/2020, 1:18 PM
๐๐ป
v
Vampire
12/11/2020, 1:19 PM
Maybe it makes more sense if you see the state of the actual instances in the debugger and it turns out to not be like you imagine it to be
o
oday
12/11/2020, 1:20 PM
yea it isnt even firstOrNull thatโs doing this, the call itself is throwing that, got it
oday
12/11/2020, 1:22 PM
haha, so silly turned out
v
Vampire
12/11/2020, 1:22 PM
๐
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by