tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler CommandLineCompiler.java
Date Fri, 01 Feb 2002 20:57:27 GMT
kinman      02/02/01 12:57:27

  Modified:    jasper/src/share/org/apache/jasper/compiler
                        CommandLineCompiler.java
  Log:
  PR: 5644
  Submitted by: steve.downey@netfolio.com (Steve Downey)
  
  Revision  Changes    Path
  1.3       +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.3
  diff -u -r1.2 -r1.3
  --- CommandLineCompiler.java	4 Feb 2001 01:04:35 -0000	1.2
  +++ CommandLineCompiler.java	1 Feb 2002 20:57:27 -0000	1.3
  @@ -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.3 2002/02/01 20:57:27 kinman Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/02/01 20:57:27 $
    *
    * 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:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message