Commit 70c7dcbf authored by jshaikh's avatar jshaikh

Added some finally block to close resultset and preparedstatement

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@198238 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c3477e01
......@@ -6044,6 +6044,24 @@ public class DistCommon {
+ e.getMessage());
e.printStackTrace();
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return intQty;
} // GET
......@@ -6220,6 +6238,24 @@ public class DistCommon {
+ e.getMessage());
e.printStackTrace();
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return itemSer;
}// end getItemSer
// added getNoArt from return ArrayList
......@@ -6503,6 +6539,24 @@ public class DistCommon {
.println("Exception...[getNoArt] " + sql + e.getMessage());
e.printStackTrace();
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
acShipperQty = shipperQty;
acIntegralQty = lcIntegralQty;
returnValue.add(Double.toString(liNoArt));
......@@ -6870,6 +6924,23 @@ public class DistCommon {
.println("Exception...[getNoArt] " + sql + e.getMessage());
e.printStackTrace();
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
acShipperQty = shipperQty;
acIntegralQty = lcIntegralQty;
return (int) liNoArt;
......@@ -7823,6 +7894,23 @@ public class DistCommon {
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return taxClass;
}
......@@ -8220,6 +8308,23 @@ public class DistCommon {
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return taxEnv;
}
......@@ -8431,6 +8536,23 @@ public class DistCommon {
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return taxChap;
}
......@@ -11537,6 +11659,24 @@ public class DistCommon {
System.out.println("Exception ::" + e);
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return priceLst;
......@@ -11732,6 +11872,23 @@ public class DistCommon {
System.out.println("Exception ::" + e);
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return mRate;
}
......@@ -11841,6 +11998,23 @@ public class DistCommon {
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
return disc;
}
......@@ -11997,6 +12171,23 @@ public class DistCommon {
{
System.out.println("Exception in calcRate-------["+e.getMessage()+"]");
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e){}
}
if(errCode == null || errCode.trim().length() == 0)
{
errMap.put("rate", finalRate);
......
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