HHH-9136 - DatabaseMetadata: NPE hides exception in finally block
- Protection against NPE in finally block - Little formatting fixes
This commit is contained in:
parent
d7173eeb3a
commit
3ad914d73f
|
@ -148,9 +148,11 @@ public class DatabaseMetadata {
|
||||||
|
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
if ( rs != null ) {
|
||||||
rs.close();
|
rs.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (SQLException sqlException) {
|
catch (SQLException sqlException) {
|
||||||
throw new SqlExceptionHelper( sqlExceptionConverter )
|
throw new SqlExceptionHelper( sqlExceptionConverter )
|
||||||
.convert( sqlException, "could not get table metadata: " + name );
|
.convert( sqlException, "could not get table metadata: " + name );
|
||||||
|
@ -179,10 +181,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