Author: jleroux
Date: Mon Apr 14 14:40:40 2014
New Revision: 1587217

URL: http://svn.apache.org/r1587217
Log:
Minor fix (resource leak): csvReader was not closed in case of exception

Modified:
    
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java

Modified: 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=1587217&r1=1587216&r2=1587217&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
 (original)
+++ 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
 Mon Apr 14 14:40:40 2014
@@ -3428,6 +3428,7 @@ public class InvoiceServices {
                         try {
                             invoiceResult = 
dispatcher.runSync("createInvoice", invoice);
                         } catch (GenericServiceException e) {
+                            csvReader.close();
                             Debug.logError(e, module);
                             return ServiceUtil.returnError(e.getMessage());
                         }
@@ -3482,6 +3483,7 @@ public class InvoiceServices {
                         try {
                             dispatcher.runSync("createInvoiceItem", 
invoiceItem);
                         } catch (GenericServiceException e) {
+                            csvReader.close();
                             Debug.logError(e, module);
                             return ServiceUtil.returnError(e.getMessage());
                         }


Reply via email to