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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 11cec4a  Improved: comment about wrong Eclipse report
11cec4a is described below

commit 11cec4a6a2be9b747904135a94cc1e83f22f4123
Author: Jacques Le Roux <[email protected]>
AuthorDate: Thu Dec 2 09:37:01 2021 +0100

    Improved: comment about wrong Eclipse report
    
    Eclipse reports: 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
---
 .../src/main/java/org/apache/ofbiz/party/party/PartyServices.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
 
b/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
index f731dcb..574d931 100644
--- 
a/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
+++ 
b/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
@@ -2438,6 +2438,10 @@ public class PartyServices {
                                         "userLogin", userLogin);
                                 result = 
dispatcher.runSync("updatePartyGroup", partyGroup);
                                 if (ServiceUtil.isError(result)) {
+                                    // 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
+                                    // BTW to be consistent Eclipse should 
also reports the same issue below
                                     return 
ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
                                 }
                             } else { // person

Reply via email to