Inspectin Gadget request

Can you add an option to Encapsulation Issues | Return of Collection or
array field to allow the return of the interface classes (e.g. List, Set,
Map, Collection, etc)?

--
Norris Shelton
Web Developer
Sun Certified Java Programmer



2 comments
Comment actions Permalink


This would be easy enough, but I don't understand the need. This inspection is for finding places where an object's state may become mutated out from under it, but something else modifying the contents of a collection or array that it owns. The fact that that collection is declared as an interface (as, of course, it almost always should be) doesn't change that.

--Dave

0
Comment actions Permalink

I think you are right. I think I remember another place where it checked
for usage of the concrete classes instead of the I/F.

--
Norris Shelton
Web Developer
Sun Certified Java Programmer


"Dave Griffith" <dave.griffith@cnn.com> wrote in message
news:10994323.1074175889661.JavaMail.itn@is.intellij.net...
>

This would be easy enough, but I don't understand the need. This

inspection is for finding places where an object's state may become mutated
out from under it, but something else modifying the contents of a collection
or array that it owns. The fact that that collection is declared as an
interface (as, of course, it almost always should be) doesn't change that.
>

--Dave



0

Please sign in to leave a comment.