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.
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich Tweet Follow @AdamBien