You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/06/11 14:43:38 UTC
(commons-csv) branch master updated: Use Objects.toString()
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git
The following commit(s) were added to refs/heads/master by this push:
new f0a90daf Use Objects.toString()
f0a90daf is described below
commit f0a90dafe1271e4988aad5304997f53f3ad90178
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jun 11 10:43:34 2024 -0400
Use Objects.toString()
---
src/main/java/org/apache/commons/csv/CSVParser.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java
index 7327e114..3cb32673 100644
--- a/src/main/java/org/apache/commons/csv/CSVParser.java
+++ b/src/main/java/org/apache/commons/csv/CSVParser.java
@@ -789,7 +789,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
if (!recordList.isEmpty()) {
recordNumber++;
- final String comment = sb == null ? null : sb.toString();
+ final String comment = Objects.toString(sb, null);
result = new CSVRecord(this, recordList.toArray(Constants.EMPTY_STRING_ARRAY), comment,
recordNumber, startCharPosition);
}