summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2011-07-12 02:37:31 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2011-07-12 02:37:31 +0000
commit150cf4f38bc6f05bfa8e28696d65943e5f4daca5 (patch)
treec021fe316e1c5afef9592a8708bf0d1c2dd4f6a0 /src
parentdeb9e04ba9908ff5a4138bd7f539d65e946fdf31 (diff)
downloadjackcess-150cf4f38bc6f05bfa8e28696d65943e5f4daca5.tar.gz
jackcess-150cf4f38bc6f05bfa8e28696d65943e5f4daca5.zip
do not allow creation of table with unsupported column type
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@568 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src')
-rw-r--r--src/java/com/healthmarketscience/jackcess/Column.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Column.java b/src/java/com/healthmarketscience/jackcess/Column.java
index b4afdbb..b216623 100644
--- a/src/java/com/healthmarketscience/jackcess/Column.java
+++ b/src/java/com/healthmarketscience/jackcess/Column.java
@@ -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");