提交 deaf41b3 authored 作者: Max Englander's avatar Max Englander

enum-support: clean up

上级 9cc7cb9a
...@@ -38,7 +38,6 @@ import org.h2.util.StringUtils; ...@@ -38,7 +38,6 @@ import org.h2.util.StringUtils;
import org.h2.value.Transfer; import org.h2.value.Transfer;
import org.h2.value.Value; import org.h2.value.Value;
import org.h2.value.ValueLobDb; import org.h2.value.ValueLobDb;
import org.h2.value.ValueString;
/** /**
* One server thread is opened per client connection. * One server thread is opened per client connection.
......
...@@ -32,7 +32,6 @@ import org.h2.util.StatementBuilder; ...@@ -32,7 +32,6 @@ import org.h2.util.StatementBuilder;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
import org.h2.value.Value; import org.h2.value.Value;
import org.h2.value.ValueLong; import org.h2.value.ValueLong;
import org.h2.value.ValueString;
import org.h2.value.ValueNull; import org.h2.value.ValueNull;
/** /**
......
...@@ -1179,8 +1179,8 @@ public class DataType { ...@@ -1179,8 +1179,8 @@ public class DataType {
* @return true if the value type is a String type * @return true if the value type is a String type
*/ */
public static boolean isStringType(int type) { public static boolean isStringType(int type) {
if (type == Value.STRING if (type == Value.STRING || type == Value.STRING_FIXED
|| type == Value.STRING_FIXED || type == Value.STRING_IGNORECASE) { || type == Value.STRING_IGNORECASE) {
return true; return true;
} }
return false; return false;
......
...@@ -18,7 +18,6 @@ import java.sql.SQLException; ...@@ -18,7 +18,6 @@ import java.sql.SQLException;
import java.sql.Time; import java.sql.Time;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.sql.Types; import java.sql.Types;
import java.util.Set;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.engine.SysProperties; import org.h2.engine.SysProperties;
...@@ -986,7 +985,7 @@ public abstract class Value { ...@@ -986,7 +985,7 @@ public abstract class Value {
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
throw DbException.get( throw DbException.get(
ErrorCode.DATA_CONVERSION_ERROR_1, e, getString() + " type=" + getType()); ErrorCode.DATA_CONVERSION_ERROR_1, e, getString());
} }
} }
...@@ -1136,16 +1135,6 @@ public abstract class Value { ...@@ -1136,16 +1135,6 @@ public abstract class Value {
// nothing to do // nothing to do
} }
/**
* Check to see if this value is one of the given permitted values.
*
* @param permittedValues the permitted values
* @return true if this value is one of the permitted values
*/
public boolean checkPermitted(Set<String> permittedValues) {
return permittedValues.contains(getString());
}
/** /**
* Check if the precision is smaller or equal than the given precision. * Check if the precision is smaller or equal than the given precision.
* *
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论