tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler SmapStratum.java SmapUtil.java
Date Thu, 31 Jul 2003 16:56:20 GMT
luehe       2003/07/31 09:56:20

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        SmapStratum.java SmapUtil.java
  Log:
  Fixed 21168 ("Incorrect paths in generated SMAP file entries")
  
  Applied (slightly modified) patch provided by ecarmich@alumni.rice.edu
  
  Revision  Changes    Path
  1.5       +7 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapStratum.java
  
  Index: SmapStratum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapStratum.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SmapStratum.java	16 Apr 2003 22:05:31 -0000	1.4
  +++ SmapStratum.java	31 Jul 2003 16:56:20 -0000	1.5
  @@ -282,7 +282,13 @@
   	for (int i = 0; i < bound; i++) {
   	    if (filePathList.get(i) != null) {
   		out.append("+ " + i + " " + fileNameList.get(i) + "\n");
  -		out.append(filePathList.get(i) + "\n");
  +                // Source paths must be relative, not absolute, so we
  +                // remove the leading "/", if one exists.
  +                String filePath = (String)filePathList.get(i);
  +                if (filePath.startsWith("/")) {
  +                    filePath = filePath.substring(1);
  +                }
  +                out.append(filePath + "\n");
   	    } else {
   		out.append(i + " " + fileNameList.get(i) + "\n");
   	    }
  
  
  
  1.15      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapUtil.java
  
  Index: SmapUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapUtil.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SmapUtil.java	30 May 2003 21:48:14 -0000	1.14
  +++ SmapUtil.java	31 Jul 2003 16:56:20 -0000	1.15
  @@ -152,7 +152,7 @@
        * Returns an unqualified version of the given file path.
        */
       private static String unqualify(String path) {
  -	return path.substring(path.lastIndexOf("/") + 1);
  +	return path.substring(path.lastIndexOf(File.separator) + 1);
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message