Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1456,10 +1456,9 @@ public Column column(String name, int probableIndex) {
public String getColumnDesc()
{
StringBuilder sb = new StringBuilder(100);
sb.append('[');
for (Column col : _columns) {
if (sb.length() == 0) {
sb.append('[');
} else {
if (sb.length() > 1) {
sb.append(',');
}
sb.append('"');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ public void testReorderWithComparator() throws Exception
_verifyLinks(schema);
}

public void testColumnDescForEmptyScheme() throws Exception
{
CsvSchema schema = CsvSchema.emptySchema();
assertEquals("[]", schema.getColumnDesc());
}

private void _verifyLinks(CsvSchema schema)
{
List<Column> all = new ArrayList<Column>();
Expand Down