From: Tim McCune Date: Tue, 30 May 2006 17:27:10 +0000 (+0000) Subject: Applied some patches contributed by Sean X-Git-Tag: rel_1_1_4~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1519a21d5edb95e3a1c011b2c7bc84b65109c5c7;p=jackcess.git Applied some patches contributed by Sean git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@48 f203690c-595d-4dc9-a70b-905162fa7fd2 --- diff --git a/src/java/com/healthmarketscience/jackcess/Column.java b/src/java/com/healthmarketscience/jackcess/Column.java index 6397415..822fb2b 100644 --- a/src/java/com/healthmarketscience/jackcess/Column.java +++ b/src/java/com/healthmarketscience/jackcess/Column.java @@ -157,15 +157,7 @@ public class Column implements Comparable { public void setType(DataType type) { _type = type; setLength((short) size()); - if (type == DataType.BOOLEAN || type == DataType.BYTE || - type == DataType.INT || type == DataType.LONG || - type == DataType.DOUBLE || type == DataType.FLOAT || - type == DataType.SHORT_DATE_TIME) - { - setVariableLength(false); - } else if (type == DataType.BINARY || type == DataType.TEXT) { - setVariableLength(true); - } + setVariableLength(type.isVariableLength()); } public DataType getType() { return _type; diff --git a/src/java/com/healthmarketscience/jackcess/Table.java b/src/java/com/healthmarketscience/jackcess/Table.java index d27a826..f3fbe43 100644 --- a/src/java/com/healthmarketscience/jackcess/Table.java +++ b/src/java/com/healthmarketscience/jackcess/Table.java @@ -129,7 +129,7 @@ public class Table { /** * @return All of the columns in this table (unmodifiable List) */ - public List getColumns() { + public List getColumns() { return Collections.unmodifiableList(_columns); } /** @@ -142,7 +142,7 @@ public class Table { /** * @return All of the Indexes on this table (unmodifiable List) */ - public List getIndexes() { + public List getIndexes() { return Collections.unmodifiableList(_indexes); }