Browse Source

jfinal 4.9

James 5 years ago
parent
commit
72e0aecced
1 changed files with 9 additions and 9 deletions
  1. 9 9
      src/main/java/com/jfinal/template/expr/ast/Arith.java

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

@@ -121,15 +121,6 @@ public class Arith extends Expr {
 		throw new TemplateException("Unsupported operation type: " + leftObj + " " +  op.value() + " " + rightObj, location);
 	}
 	
-	private int getMaxType(Number obj1, Number obj2) {
-		int t1 = getType(obj1);
-		if (t1 == BIGDECIMAL) {
-			return BIGDECIMAL;
-		}
-		int t2 = getType(obj2);
-		return t1 > t2 ? t1 : t2;
-	}
-	
 	static BigDecimal[] toBigDecimals(Number left, Number right) {
 		BigDecimal[] ret = new BigDecimal[2];
 		
@@ -148,6 +139,15 @@ public class Arith extends Expr {
 		return ret;
 	}
 	
+	private int getMaxType(Number obj1, Number obj2) {
+		int t1 = getType(obj1);
+		if (t1 == BIGDECIMAL) {
+			return BIGDECIMAL;
+		}
+		int t2 = getType(obj2);
+		return t1 > t2 ? t1 : t2;
+	}
+	
 	private int getType(Number obj) {
 		if (obj instanceof Integer) {
 			return INT;