Author: markt
Date: Tue Apr 8 15:26:05 2008
New Revision: 646106
URL: http://svn.apache.org/viewvc?rev=646106&view=rev
Log:
Better patch for 44766. I still can't see why the original code listed the
classes individually.
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=646106&r1=646105&r2=646106&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java Tue Apr 8 15:26:05
2008
@@ -326,8 +326,11 @@
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 type == Long.TYPE || type == Double.TYPE ||
+ type == Byte.TYPE || type == Short.TYPE ||
+ type == Integer.TYPE || type == Float.TYPE ||
+ Number.class.isAssignableFrom(type);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]