You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2021/12/29 17:37:30 UTC

[ofbiz-framework] branch release18.12 updated: Improved: suppresses 2 warnings related to deprecated CSVFormat.DEFAULT.withHeader()

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new d38ff24  Improved: suppresses 2 warnings related to deprecated CSVFormat.DEFAULT.withHeader()
d38ff24 is described below

commit d38ff24cf3ff7418e6f62779e88f5e08ac3fa5c7
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed Dec 29 18:32:18 2021 +0100

    Improved: suppresses 2 warnings related to deprecated CSVFormat.DEFAULT.withHeader()
    
    InvoiceServices merge "did not went well"
---
 .../main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
index 4cdf7d1..d536275 100644
--- a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
+++ b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
@@ -3634,7 +3634,7 @@ public class InvoiceServices {
                                return ServiceUtil.returnError(ServiceUtil.getErrorMessage(invoiceResult));
                             }
                         } catch (GenericServiceException e) {
-                            Debug.logError(e, MODULE);
+                            Debug.logError(e, module);
                             // Eclipse reports here: Resource leak: '<unassigned Closeable value>' is not closed at this location
                             // but it's OK. As csvReader is in a try-with-ressource it will be closed anyway
                             // I prefer to not put @SuppressWarnings("resource") to the whole method
@@ -3700,7 +3700,6 @@ public class InvoiceServices {
                                return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
                             }
                         } catch (GenericServiceException e) {
-                            csvReader.close();
                             Debug.logError(e, module);
                             return ServiceUtil.returnError(e.getMessage());
                         }