Author: markt
Date: Thu Jul  8 21:29:12 2010
New Revision: 961948

URL: http://svn.apache.org/viewvc?rev=961948&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49555
Correctly handle tag libraries that use functions defined in static inner 
classes

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java?rev=961948&r1=961947&r2=961948&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java Thu Jul  
8 21:29:12 2010
@@ -212,8 +212,8 @@ public class ELFunctionMapper {
                 FunctionInfo funcInfo = f.getFunctionInfo();
                 String key = f.getPrefix()+ ":" + f.getName();
                 ds.append(funcMethod + "(\"" + key + "\", " +
-                        funcInfo.getFunctionClass() + ".class, " +
-                        '\"' + f.getMethodName() + "\", " +
+                        getCanonicalName(funcInfo.getFunctionClass()) +
+                        ".class, " + '\"' + f.getMethodName() + "\", " +
                         "new Class[] {");
                 String params[] = f.getParameters();
                 for (int k = 0; k < params.length; k++) {
@@ -286,6 +286,17 @@ public class ELFunctionMapper {
         private String getMapName() {
             return "_jspx_fnmap_" + currFunc++;
         }
+
+        /**
+         * Convert a binary class name into a canonical one that can be used
+         * when generating Java source code.
+         * 
+         * @param className Binary class name
+         * @return          Canonical equivalent
+         */
+        private String getCanonicalName(String className) {
+            return className.replace('$', '.');
+        }
     }
 }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=961948&r1=961947&r2=961948&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jul  8 21:29:12 2010
@@ -149,6 +149,10 @@
         Improve logging of JSP exceptions by including JSP snippet (if enabled)
         rather than just the root cause in the host log. (markt)
       </add>
+      <fix>
+        <bug>49555</bug>: Correctly handled Tag Libraries where functions are
+        defined in static inner classes. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to