[Inspection Gadgets 0.0.9] Return of Collections or array field
Hi Dave,
I found that this inspection is complaining about return of Collections.EMPTY_?????.
How about not doing so, as they are unmodifiable by default?
Thanks,
Robert
Please sign in to leave a comment.
Good call. I'll put it on the TODO list.
--Dave
This particular inspection also doesn't understand a related pattern I frequently use:
(No, this pattern isn't perfect, but it's generally good enough.) I'm not sure exactly how the inspection could be changed to not warn me in this case, but if it's simple enough and correct enough, it'd be useful.
Of course, I could simply change my pattern to create a new unmodifiableList on each call to getThings() with minimal impact, too...