Well, obviously the new code is not equivalent to the old one, because Long.TYPE and other TYPE constants are the classes for the primitive types (long, int etc.), and those are not an instance of java.lang.Number.
>From the sources: o.a.el.lang.ELArithmetic.isNumberType() is used in o.a.el.lang.ELSupport.checkType() and that is used in o.a.jasper.compiler.Validator.checkXmlAttributes() Looking into Validator.checkXmlAttributes(), there is "expectedClass = JspUtil.toClass(expectedType, loader);" and the value returned by JspUtil.toClass() may be "long.class" or other primitive class. It is from reading the sources. Have not run it though. 2008/4/9 <[EMAIL PROTECTED]>: > 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 > == ... > + 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]