HHH-9136 - DatabaseMetadata: NPE hides exception in finally block

- Protection against NPE in finally block
- Little formatting fixes
This commit is contained in:
msulima 2014-04-20 14:12:20 +02:00 committed by Brett Meyer
parent 9bd6917d0d
commit 3b18c275ea
1 changed files with 23 additions and 18 deletions

View File

@ -157,9 +157,11 @@ public class DatabaseMetadata {
}
finally {
if ( rs != null ) {
rs.close();
}
}
}
catch (SQLException sqlException) {
throw sqlExceptionHelper.convert( sqlException, "could not get table metadata: " + name );
}
@ -187,10 +189,13 @@ public class DatabaseMetadata {
}
}
finally {
if ( rs != null ) {
rs.close();
}
if ( statement != null ) {
statement.close();
}
}
}
}
}