luehe 2002/08/30 10:42:00 Modified: jasper2/src/share/org/apache/jasper/compiler JspUtil.java Log: When parsing TLD <function-signature> element, convert primitive parameter types into Class objects by appending ".class" to the keyword for the primitive type (e.g., "int.class"), instead of calling Class.forName(). Revision Changes Path 1.14 +25 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java Index: JspUtil.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- JspUtil.java 23 Aug 2002 23:56:53 -0000 1.13 +++ JspUtil.java 30 Aug 2002 17:42:00 -0000 1.14 @@ -733,7 +733,7 @@ tagName, this.methodName ) ); } - parameterTypes.add( Class.forName( argType ) ); + parameterTypes.add(toClass(argType)); String comma; do { @@ -781,6 +781,27 @@ public Class[] getParameterTypes() { return this.parameterTypes; } + + private Class toClass(String type) throws ClassNotFoundException { + if ("boolean".equals(type)) + return boolean.class; + else if ("char".equals(type)) + return char.class; + else if ("byte".equals(type)) + return byte.class; + else if ("short".equals(type)) + return short.class; + else if ("int".equals(type)) + return int.class; + else if ("long".equals(type)) + return long.class; + else if ("float".equals(type)) + return float.class; + else if ("double".equals(type)) + return double.class; + else + return Class.forName(type); + } } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>