kinman 02/02/01 12:58:37 Modified: jasper/src/share/org/apache/jasper/compiler Tag: tomcat_40_branch CommandLineCompiler.java Log: PR: 5644 Submitted by: [EMAIL PROTECTED] (Steve Downey) Revision Changes Path No revision No revision 1.2.2.1 +10 -6 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CommandLineCompiler.java Index: CommandLineCompiler.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CommandLineCompiler.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- CommandLineCompiler.java 4 Feb 2001 01:04:35 -0000 1.2 +++ CommandLineCompiler.java 1 Feb 2002 20:58:37 -0000 1.2.2.1 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CommandLineCompiler.java,v 1.2 2001/02/04 01:04:35 glenn Exp $ - * $Revision: 1.2 $ - * $Date: 2001/02/04 01:04:35 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CommandLineCompiler.java,v 1.2.2.1 2002/02/01 20:58:37 kinman Exp $ + * $Revision: 1.2.2.1 $ + * $Date: 2002/02/01 20:58:37 $ * * The Apache Software License, Version 1.1 * @@ -175,9 +175,13 @@ // Fix for invalid characters. If you think of more add to the list. StringBuffer modifiedClassName = new StringBuffer(); - for (int i = 0; i < className.length(); i++) { - if (Character.isLetterOrDigit(className.charAt(i)) == true) - modifiedClassName.append(className.substring(i,i+1)); + if (Character.isJavaIdentifierStart(className.charAt(0))) + modifiedClassName.append(className.charAt(0)); + else + modifiedClassName.append(mangleChar(className.charAt(0))); + for (int i = 1; i < className.length(); i++) { + if (Character.isJavaIdentifierPart(className.charAt(i))) + modifiedClassName.append(className.charAt(i)); else modifiedClassName.append(mangleChar(className.charAt(i))); }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>