Adam Bien's Weblog
Why Not Private Visibility For Injected Fields [Screencast]
Package visibility for injected fields encapsulates way better than public accessors and makes unit testing more convenient at the same time.
The following video demonstrates what can happen in worst case:
In the screencast NetBeans 7.2 Java EE edition and Glassfish 3.1.2 were used without any additional extension or plugin.
"Why Not Private" is the fifth screencast in the http://www.youtube.com/user/bienadam channel.
Special Event: Java 8 with Java EE 7: "More Power with Less Code", 13th October, 2014 Tweet Follow @AdamBien