Useless throwing Exceptions
Found this code a long time ago:
try {
if( something == null )
throw new RuntimeException("...");
} catch(Exception e){
e.printStackTrace();
}
and I wondered why on earth the try/throw/catch
has been used instead of:
if( something == null )
new RuntimeException("...").printStackTrace();