*BF [ 1874419 ] JDBC Statement not close in a finally block
This commit is contained in:
parent
dcc794fddc
commit
16697248fb
|
@ -283,20 +283,18 @@ public class WebUser
|
|||
+ " AND AD_User_ID=?";
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(sql, null);
|
||||
pstmt.setInt(1, m_AD_Client_ID);
|
||||
pstmt.setInt(2, AD_User_ID);
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next())
|
||||
{
|
||||
m_bpc = new MUser (m_ctx, rs, null);
|
||||
log.fine("= found BPC=" + m_bpc);
|
||||
}
|
||||
rs.close();
|
||||
pstmt.close();
|
||||
pstmt = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -304,14 +302,8 @@ public class WebUser
|
|||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if (pstmt != null)
|
||||
pstmt.close ();
|
||||
}
|
||||
catch (Exception e)
|
||||
{}
|
||||
pstmt = null;
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
|
||||
// Password not entered
|
||||
|
|
Loading…
Reference in New Issue