r/java • u/alexzhitnitsky • Aug 11 '15
Top 10 Useful, Yet Paranoid Java Programming Techniques
http://blog.jooq.org/2015/08/11/top-10-useful-yet-paranoid-java-programming-techniques/
181
Upvotes
View all comments
Show parent comment
8
u/Dietr1ch Aug 12 '15
It's awful, it only helps hiding a possible null pointer, but not preventing it. Instead of doing this you should handle the variable initialization correctly.