]> source.dussan.org Git - jackcess.git/commitdiff
do not allow creation of table with unsupported column type
authorJames Ahlborn <jtahlborn@yahoo.com>
Tue, 12 Jul 2011 02:37:31 +0000 (02:37 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Tue, 12 Jul 2011 02:37:31 +0000 (02:37 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@568 f203690c-595d-4dc9-a70b-905162fa7fd2

src/java/com/healthmarketscience/jackcess/Column.java

index b4afdbb2cfc4e6f567b84af3bfb60e2c8430153f..b216623796a38bab35583064b18acca250850b0c 100644 (file)
@@ -483,6 +483,11 @@ public class Column implements Comparable<Column> {
     }
     Database.validateIdentifierName(getName(), format.MAX_COLUMN_NAME_LENGTH,
                                     "column");
+
+    if(getType().isUnsupported()) {
+      throw new IllegalArgumentException(
+          "Cannot create column with unsupported type " + getType());
+    }
     
     if(isVariableLength() != getType().isVariableLength()) {
       throw new IllegalArgumentException("invalid variable length setting");