Unverified 提交 cce30b3e authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #823 from katzyn/misc

Use ValueByte.getInt() and ValueShort.getInt() in convertTo()
...@@ -656,7 +656,6 @@ public abstract class Value { ...@@ -656,7 +656,6 @@ public abstract class Value {
case BOOLEAN: case BOOLEAN:
return ValueByte.get(getBoolean() ? (byte) 1 : (byte) 0); return ValueByte.get(getBoolean() ? (byte) 1 : (byte) 0);
case SHORT: case SHORT:
return ValueByte.get(convertToByte(getShort(), column));
case ENUM: case ENUM:
case INT: case INT:
return ValueByte.get(convertToByte(getInt(), column)); return ValueByte.get(convertToByte(getInt(), column));
...@@ -706,11 +705,9 @@ public abstract class Value { ...@@ -706,11 +705,9 @@ public abstract class Value {
case BOOLEAN: case BOOLEAN:
return ValueInt.get(getBoolean() ? 1 : 0); return ValueInt.get(getBoolean() ? 1 : 0);
case BYTE: case BYTE:
return ValueInt.get(getByte());
case ENUM: case ENUM:
return ValueInt.get(getInt());
case SHORT: case SHORT:
return ValueInt.get(getShort()); return ValueInt.get(getInt());
case LONG: case LONG:
return ValueInt.get(convertToInt(getLong(), column)); return ValueInt.get(convertToInt(getLong(), column));
case DECIMAL: case DECIMAL:
...@@ -732,9 +729,7 @@ public abstract class Value { ...@@ -732,9 +729,7 @@ public abstract class Value {
case BOOLEAN: case BOOLEAN:
return ValueLong.get(getBoolean() ? 1 : 0); return ValueLong.get(getBoolean() ? 1 : 0);
case BYTE: case BYTE:
return ValueLong.get(getByte());
case SHORT: case SHORT:
return ValueLong.get(getShort());
case ENUM: case ENUM:
case INT: case INT:
return ValueLong.get(getInt()); return ValueLong.get(getInt());
...@@ -763,9 +758,7 @@ public abstract class Value { ...@@ -763,9 +758,7 @@ public abstract class Value {
case BOOLEAN: case BOOLEAN:
return ValueDecimal.get(BigDecimal.valueOf(getBoolean() ? 1 : 0)); return ValueDecimal.get(BigDecimal.valueOf(getBoolean() ? 1 : 0));
case BYTE: case BYTE:
return ValueDecimal.get(BigDecimal.valueOf(getByte()));
case SHORT: case SHORT:
return ValueDecimal.get(BigDecimal.valueOf(getShort()));
case ENUM: case ENUM:
case INT: case INT:
return ValueDecimal.get(BigDecimal.valueOf(getInt())); return ValueDecimal.get(BigDecimal.valueOf(getInt()));
...@@ -799,9 +792,7 @@ public abstract class Value { ...@@ -799,9 +792,7 @@ public abstract class Value {
case BOOLEAN: case BOOLEAN:
return ValueDouble.get(getBoolean() ? 1 : 0); return ValueDouble.get(getBoolean() ? 1 : 0);
case BYTE: case BYTE:
return ValueDouble.get(getByte());
case SHORT: case SHORT:
return ValueDouble.get(getShort());
case INT: case INT:
return ValueDouble.get(getInt()); return ValueDouble.get(getInt());
case LONG: case LONG:
...@@ -822,9 +813,7 @@ public abstract class Value { ...@@ -822,9 +813,7 @@ public abstract class Value {
case BOOLEAN: case BOOLEAN:
return ValueFloat.get(getBoolean() ? 1 : 0); return ValueFloat.get(getBoolean() ? 1 : 0);
case BYTE: case BYTE:
return ValueFloat.get(getByte());
case SHORT: case SHORT:
return ValueFloat.get(getShort());
case INT: case INT:
return ValueFloat.get(getInt()); return ValueFloat.get(getInt());
case LONG: case LONG:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论