HHH-9136 - DatabaseMetadata: NPE hides exception in finally block
- Protection against NPE in finally block - Little formatting fixes
This commit is contained in:
parent
9bd6917d0d
commit
3b18c275ea
|
@ -157,9 +157,11 @@ public class DatabaseMetadata {
|
||||||
|
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
if ( rs != null ) {
|
||||||
rs.close();
|
rs.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (SQLException sqlException) {
|
catch (SQLException sqlException) {
|
||||||
throw sqlExceptionHelper.convert( sqlException, "could not get table metadata: " + name );
|
throw sqlExceptionHelper.convert( sqlException, "could not get table metadata: " + name );
|
||||||
}
|
}
|
||||||
|
@ -187,10 +189,13 @@ public class DatabaseMetadata {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
if ( rs != null ) {
|
||||||
rs.close();
|
rs.close();
|
||||||
|
}
|
||||||
|
if ( statement != null ) {
|
||||||
statement.close();
|
statement.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue