Re:Common exception misuses in Java (and not only)
by sigvef on Monday March 24, 2014 @02:34AM
(#7457034)
Though the author is correct in advising to do exception handling like this[1] instead of this[2], they are not correct in the reasoning behind it. In method [2], if a writer cannot be instanciated, the code will still try to write with it, which will probably cause a NullPointerException. Rewriting to method [1] hinders this.
[1]: