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
请先登录再写评论。
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
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...
>
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.
>