Browse Source

jfinal 3.2 release ^_^

James 8 years ago
parent
commit
8c2c1e931a

+ 2 - 5
src/main/java/com/jfinal/template/expr/ast/Arith.java

@@ -37,11 +37,6 @@ public class Arith extends Expr {
 	public static final int DOUBLE = 3;
 	public static final int DOUBLE = 3;
 	public static final int BIGDECIMAL = 4;
 	public static final int BIGDECIMAL = 4;
 	
 	
-	// 后续版本考虑支持
-	// public static final int BYTE = 5;
-	// public static final int SHORT = 6;
-	// public static final int BIGINTEGER = 7;
-	
 	private Sym op;
 	private Sym op;
 	private Expr left;
 	private Expr left;
 	private Expr right;
 	private Expr right;
@@ -136,6 +131,8 @@ public class Arith extends Expr {
 			return DOUBLE;
 			return DOUBLE;
 		} else if (obj instanceof BigDecimal) {
 		} else if (obj instanceof BigDecimal) {
 			return BIGDECIMAL;
 			return BIGDECIMAL;
+		} else if (obj instanceof Short || obj instanceof Byte) {
+			return INT;
 		}
 		}
 		throw new TemplateException("Unsupported data type: " + obj.getClass().getName(), location);
 		throw new TemplateException("Unsupported data type: " + obj.getClass().getName(), location);
 	}
 	}

+ 2 - 0
src/main/java/com/jfinal/template/expr/ast/Compare.java

@@ -247,6 +247,8 @@ public class Compare extends Expr {
 			return Arith.DOUBLE;
 			return Arith.DOUBLE;
 		} else if (obj instanceof BigDecimal) {
 		} else if (obj instanceof BigDecimal) {
 			return Arith.BIGDECIMAL;
 			return Arith.BIGDECIMAL;
+		} else if (obj instanceof Short || obj instanceof Byte) {
+			return Arith.INT;
 		}
 		}
 		throw new TemplateException("Unsupported data type: " + obj.getClass().getName(), location);
 		throw new TemplateException("Unsupported data type: " + obj.getClass().getName(), location);
 	}
 	}