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.
Java EE 7 + HTML 5 Workshops, 7th Edition: March 24th-28th, 2014, Airport Munich Tweet Follow @AdamBien