Skip to content

Commit b018983

Browse files
committed
Add a toBuilder method to do:
CSVFormat format = CSVFormat.EXCEL.toBuilder().withHeader("Col1", "Col2", "Col3").build(); Instead of: CSVFormat format = CSVFormat.newBuilder(CSVFormat.EXCEL).withHeader("Col1", "Col2", "Col3").build(); git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460255 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6b2a504 commit b018983

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public void testCommentStart() {
5353
public void testCopiedFormatIsEqualToOriginal() {
5454
final CSVFormat copyOfRCF4180 = CSVFormat.newBuilder(RFC4180).build();
5555
assertEquals(RFC4180, copyOfRCF4180);
56+
final CSVFormat copy2OfRCF4180 = RFC4180.toBuilder().build();
57+
assertEquals(RFC4180, copy2OfRCF4180);
5658
}
5759

5860
@Test

0 commit comments

Comments
 (0)