Date: 12/21/05 (Code WTF) Keywords: database, sql
public static void isDBConnectionValid(Connection dbConnection) throws Exception { if(dbConnection == null) throw new SQLException("Database connection does not exist"); else return; }
Source: http://www.livejournal.com/community/code_wtf/21568.html