Commit 6dd87662 authored by kgharal's avatar kgharal

updated for adding finally block closing result set and prepare statement in confirmReturn method


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93415 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cb7e4339
...@@ -104,12 +104,22 @@ public class SalesReturnAutoConf implements Schedule ...@@ -104,12 +104,22 @@ public class SalesReturnAutoConf implements Schedule
{ {
try try
{ {
if(rs != null)
{
rs.close();
rs =null;
}
if(pStmt != null)
{
pStmt.close();
pStmt = null;
}
if(conn != null) if(conn != null)
{ {
conn.close(); conn.close();
conn =null; conn =null;
} }
} }
catch(SQLException sqle) catch(SQLException sqle)
{ {
...@@ -208,6 +218,28 @@ public class SalesReturnAutoConf implements Schedule ...@@ -208,6 +218,28 @@ public class SalesReturnAutoConf implements Schedule
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
finally
{
try
{
if(rs != null)
{
rs.close();
rs =null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(SQLException sqle)
{
sqle.printStackTrace();
}
}
return retString; return retString;
}//end of confirmReceipt }//end of confirmReceipt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment