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...
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...