I am getting this error

I had written if-else to donot to consider zero-length array but this warning didn’t go away. please help

even I faced the very same problem

temp1 is what you need to look at, in your code…use the link I provided, and find out what’s happening.

I don’t know how you have used if-else or what you have coded there…but the error is occurring only because the method that you used may sometimes return null and you haven’t considered that case

But I followed this, and was able to solve the issue within no time.

In that Screenshot, there is also written that in which line you may get this potential exception. Please look at that line. Spotbugs also tells you what you can do to avoid the warnings.

1 Like