Skip to content

Commit 554473d

Browse files
author
chengyitian
committed
AJ-460: addColumn's colName cannot be empty.
1 parent 0f88552 commit 554473d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/com/xxdb/data/BasicTable.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ public void addColumn(String colName, Vector col) {
381381
if (Objects.isNull(colName) || Objects.isNull(col))
382382
throw new RuntimeException("The param 'colName' or 'col' in table cannot be null.");
383383

384+
if (colName.isEmpty())
385+
throw new RuntimeException("The param 'colName' cannot be empty.");
386+
384387
if (colNames.contains(colName))
385388
throw new RuntimeException("The table already contains column '" + colName + "'.");
386389

0 commit comments

Comments
 (0)