Instead of:

```java
con.close();
```

use:

```java
closeConnection(con);
```

If getConnection() returns null or throws an exception, the finally clause is still called and will then throw a NullPointerException, masking the actual, original error.