You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2026/04/18 16:39:29 UTC
(ofbiz-framework) 03/07: Fixed: Update CSVFormat usage to resolve compilation warnings
This is an automated email from the ASF dual-hosted git repository.
jacopoc pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit ec2b92e48f1757f385b35e77c5c27b59d570bb7e
Author: Jacopo Cappellato <ja...@gmail.com>
AuthorDate: Thu Apr 16 12:07:58 2026 +0200
Fixed: Update CSVFormat usage to resolve compilation warnings
(cherry picked from commit b73a14c2fd63e485d12f4bfb762aeae4104fc63d)
---
.../main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java | 2 +-
.../party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java | 2 +-
.../security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java | 2 +-
3 files changed, 3 insertions(+), 3 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 17e2b71f7c..b536017115 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
@@ -3674,7 +3674,7 @@ public class InvoiceServices {
String encoding = System.getProperty("file.encoding");
String csvString = Charset.forName(encoding).decode(fileBytes).toString();
Builder csvFormatBuilder = Builder.create().setHeader();
- CSVFormat fmt = csvFormatBuilder.build();
+ CSVFormat fmt = csvFormatBuilder.get();
List<String> errMsgs = new LinkedList<>();
List<String> newErrMsgs;
String lastInvoiceId = null;
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 5b2ea3147e..93f9555d03 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
@@ -2297,7 +2297,7 @@ public class PartyServices {
String encoding = System.getProperty("file.encoding");
String csvString = Charset.forName(encoding).decode(fileBytes).toString();
Builder csvFormatBuilder = Builder.create().setHeader();
- CSVFormat fmt = csvFormatBuilder.build();
+ CSVFormat fmt = csvFormatBuilder.get();
List<String> errMsgs = new LinkedList<>();
List<String> newErrMsgs = new LinkedList<>();
String lastPartyId = null; // last partyId read from the csv file
diff --git a/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java b/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
index decaf8cd0b..5b711676be 100644
--- a/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
+++ b/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
@@ -919,7 +919,7 @@ public class SecuredUpload {
// cf. https://commons.apache.org/proper/commons-csv/apidocs/org/apache/commons/csv/CSVFormat.html
if (!content.contains("</svg>")) {
- try (CSVParser parser = new CSVParser(in, cvsFormat)) {
+ try (CSVParser parser = cvsFormat.parse(in)) {
parser.getRecords();
}
} else {