Author: markt
Date: Thu Apr 17 10:39:46 2008
New Revision: 649198
URL: http://svn.apache.org/viewvc?rev=649198&view=rev
Log:
Fix bug 44766. EL doesn't coerce custom Number subclasses.
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/el/lang/ELArithmetic.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=649198&r1=649197&r2=649198&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Apr 17 10:39:46 2008
@@ -65,12 +65,6 @@
+1: jfclere, rjung, fhanik, remm
-1:
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44766
- Handle custom subtypes of java.lang.Number
- http://svn.apache.org/viewvc?view=rev&revision=646106
- +1: markt, remm, rjung
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44392
Correct handling of HTML entities in SSI processing
http://svn.apache.org/viewvc?rev=647289&view=rev
Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/lang/ELArithmetic.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/el/lang/ELArithmetic.java?rev=649198&r1=649197&r2=649198&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/el/lang/ELArithmetic.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/el/lang/ELArithmetic.java Thu Apr 17
10:39:46 2008
@@ -324,8 +324,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);
}
/**
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=649198&r1=649197&r2=649198&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Apr 17 10:39:46 2008
@@ -145,6 +145,9 @@
<fix>
<bug>44428</bug>: Fix possible NPE during serialization. (markt)
</fix>
+ <fix>
+ <bug>44766</bug>: EL doesn't coerce custom Number subclasses. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Webapps">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]