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