Use Objects.toString()

This commit is contained in:
Gary Gregory 2024-06-11 10:43:34 -04:00
parent 9eb208af32
commit f0a90dafe1

View File

@ -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);
}