Skip to content

Commit 892b2a1

Browse files
jeffjensenclaude
andcommitted
fix(ant): Include csv in Export.setFormat's unsupported-format message
setFormat(String) has always accepted "csv" via isSupportedFormat(), but its IllegalArgumentException message listed only 'flat'(default), 'xml', 'dtd', 'xls', and 'yml' - omitting the one format this area's other bugs (issue 808) are specifically about, and misleading anyone who hit the exception into thinking csv wasn't supported. Refs: 808 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QqQTzFd5qsXiMTpFsReD12
1 parent 51341ff commit 892b2a1

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@
8686
<action dev="jeffjensen" type="fix" issue="808" system="github" due-to="jeffjensen">
8787
Fix the Ant export step rejecting format="CSV" in uppercase and leaving an empty output file behind for unsupported formats. Also, an unsupported format is now rejected before the database connection is queried for the export dataset, instead of after, since format validity doesn't depend on the connection.
8888
</action>
89+
<action dev="jeffjensen" type="fix" issue="808" system="github" due-to="jeffjensen">
90+
Fix Export.setFormat()'s IllegalArgumentException message omitting 'csv' from the list of valid formats, even though csv has always been accepted.
91+
</action>
8992
<action dev="jeffjensen" type="fix" issue="809" system="github" due-to="jeffjensen">
9093
DefaultPrepAndExpectedTestCase.postTest now attaches a verify failure as suppressed on the cleanup exception that deliberately shadows it, instead of losing it.
9194
</action>

src/main/java/org/dbunit/ant/Export.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void setFormat(String format)
114114
}
115115
else
116116
{
117-
throw new IllegalArgumentException("Type must be one of: 'flat'(default), 'xml', 'dtd', 'xls' or 'yml' but was: " + format);
117+
throw new IllegalArgumentException("Type must be one of: 'flat'(default), 'xml', 'dtd', 'csv', 'xls' or 'yml' but was: " + format);
118118
}
119119
}
120120

0 commit comments

Comments
 (0)