2010/7/9 <ma...@apache.org>: > 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 >
> --- 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('$', '.'); > + } > } > } > I wonder why funcInfo.getFunctionClass().getCanonicalName() cannot be used. And there is also o.a.jasper.compiler.JspUtil.getCanonicalName(Class) with a JavaDoc comment that "simple replacement of '$' with '.' does not work". Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org