tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r646076 - /tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java
Date Tue, 08 Apr 2008 21:25:04 GMT
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message