luehe 2002/09/03 15:26:24 Modified: jasper2/src/share/org/apache/jasper/compiler JspUtil.java Validator.java Log: Fixed 12201: Problem defining values for type element in attributes of custom actions Revision Changes Path 1.15 +28 -27 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.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- JspUtil.java 30 Aug 2002 17:42:00 -0000 1.14 +++ JspUtil.java 3 Sep 2002 22:26:23 -0000 1.15 @@ -530,6 +530,30 @@ } /** + * + */ + public static 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); + } + + /** * Produces a String representing a call to the EL interpreter. * @param expression a String containing zero or more "${}" expressions * @param expectedType the expected type of the interpreted result @@ -780,32 +804,9 @@ 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); - } + } } - } - class MyEntityResolver implements EntityResolver { public InputSource resolveEntity(String publicId, String systemId) 1.33 +4 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java Index: Validator.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- Validator.java 28 Aug 2002 22:02:11 -0000 1.32 +++ Validator.java 3 Sep 2002 22:26:23 -0000 1.33 @@ -691,7 +691,7 @@ expectedType = JspFragment.class; } else if( typeStr != null ) { - expectedType = Class.forName( typeStr ); + expectedType = JspUtil.toClass( typeStr ); } jspAttrs[i] = getJspAttribute(attrs.getQName(i),
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>