Skip to content

Commit 4929cb2

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 12a39f8 commit 4929cb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/java/org/apache/commons/csv/CSVParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ void testEndOfFileBehaviorExcel() throws Exception {
587587
@ParameterizedTest
588588
@EnumSource(value = CSVFormat.Predefined.class, names = { "MySQL", "PostgreSQLCsv", "PostgreSQLText", "Oracle" })
589589
void testEscapedNullStringIsAValue(final CSVFormat.Predefined predefined) throws Exception {
590-
// "\N" is the MySQL and PostgreSQL null marker, "\\N" is the value "\N", which is what the printer writes for it.
590+
// For formats whose null string is "\\N" (e.g., MySQL, PostgreSQL Text, Oracle), a literal value "\\N" must be written as "\\\\N" so it is not read back as null.
591591
final CSVFormat format = predefined.getFormat();
592592
final StringWriter writer = new StringWriter();
593593
try (CSVPrinter printer = new CSVPrinter(writer, format)) {

0 commit comments

Comments
 (0)