Author: markt Date: Tue Apr 8 14:25:04 2008 New Revision: 646076 URL: http://svn.apache.org/viewvc?rev=646076&view=rev Log: This fixes 44766 but I can't see why the code was written as originally coded. Any light much appreciated. I'll give it a couple of days and then, assuming there are no objections, propose it for 6.0.x.
Modified: tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java Modified: tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java?rev=646076&r1=646075&r2=646076&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java (original) +++ tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java Tue Apr 8 14:25:04 2008 @@ -326,8 +326,8 @@ return (obj != null && isNumberType(obj.getClass())); } - public final static boolean isNumberType(final Class type) { - return type == (java.lang.Long.class) || type == Long.TYPE || type == (java.lang.Double.class) || type == Double.TYPE || type == (java.lang.Byte.class) || type == Byte.TYPE || type == (java.lang.Short.class) || type == Short.TYPE || type == (java.lang.Integer.class) || type == Integer.TYPE || type == (java.lang.Float.class) || type == Float.TYPE || type == (java.math.BigInteger.class) || type == (java.math.BigDecimal.class); + public final static boolean isNumberType(final Class<?> type) { + return (Number.class.isAssignableFrom(type)); } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]