portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/profiler JetspeedProfilerService.java
Date Tue, 19 Jun 2001 15:20:34 GMT
taylor      01/06/19 08:20:34

  Modified:    src/java/org/apache/jetspeed/services/profiler
                        JetspeedProfilerService.java
  Log:
  - applied patch to profiler service provided by Steve Davis
  
  Revision  Changes    Path
  1.7       +18 -15    jakarta-jetspeed/src/java/org/apache/jetspeed/services/profiler/JetspeedProfilerService.java
  
  Index: JetspeedProfilerService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/profiler/JetspeedProfilerService.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JetspeedProfilerService.java	2001/06/09 15:37:32	1.6
  +++ JetspeedProfilerService.java	2001/06/19 15:20:31	1.7
  @@ -110,7 +110,7 @@
    *
    * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
    * @author <a href="mailto:sgala@hisitech.com">Santiago Gala</a>
  - * @version $Id: JetspeedProfilerService.java,v 1.6 2001/06/09 15:37:32 raphael Exp $
  + * @version $Id: JetspeedProfilerService.java,v 1.7 2001/06/19 15:20:31 taylor Exp $
    */
   
   public class JetspeedProfilerService  extends TurbineBaseService
  @@ -648,12 +648,12 @@
               langPath.append( fullPath.toString() );
               if ((language != null) && (language.length() > 0))
               {
  -                langPath.append(language).append("/");
  +                langPath.append(language).append(PATH_SEPARATOR);
                   count++;
               }
               if ((country != null) && (country.length() > 0))
               {
  -                langPath.append(country).append("/");
  +                langPath.append(country).append(PATH_SEPARATOR);
                   count++;
               }
               String basePath = langPath.toString();
  @@ -1026,32 +1026,35 @@
           String finalPath;
   
           // make sure resourceType doesn't end with "/" but starts with "/"
  -        if (resourceType.endsWith("/"))
  +        if (resourceType.endsWith(PATH_SEPARATOR))
           {
               resourceType = resourceType.substring(0, resourceType.length()-1);
           }
  -        if (!resourceType.startsWith("/"))
  +        if (!resourceType.startsWith(PATH_SEPARATOR))
           {
  -            resourceType = "/"+resourceType;
  +            resourceType = PATH_SEPARATOR + resourceType;
           }
           // make sure path doesn't end with "/" but starts with "/"
  -        if (path.endsWith("/"))
  +        if (path.endsWith(PATH_SEPARATOR))
           {
               path = path.substring(0, path.length()-1);
           }
  -        if (!path.startsWith("/"))
  +        if (!path.startsWith(PATH_SEPARATOR))
           {
  -            path = "/"+path;
  +            path = PATH_SEPARATOR + path;
           }
           // make sure template starts with "/"
  -        if (!template.startsWith("/"))
  +        if (!template.startsWith(PATH_SEPARATOR))
           {
  -            template = "/"+template;
  +            template = PATH_SEPARATOR + template;
           }
           
           StringBuffer fullPath = new StringBuffer( templateRoot );
   
  -        fullPath.append("/").append(getTemplateExtension(template));
  +        if (!templateRoot.endsWith(PATH_SEPARATOR))
  +            fullPath.append(PATH_SEPARATOR);
  +        fullPath.append(getTemplateExtension(template));
  +
           fullPath.append(resourceType);
           
           String basePath = fullPath.toString();
  @@ -1112,16 +1115,16 @@
           String type = MimeType.getCode( cm.getPreferredType() );
           data.setContentType( cm.getPreferredType().toString() );  
           if ((type != null) && (type.length() > 0)) 
  -            templatePath.append("/").append(type);
  +            templatePath.append(PATH_SEPARATOR).append(type);
           
           // Grab the Locale from the temporary storage in the User object
           Locale locale = (Locale)data.getUser().getTemp("locale");
           String language = locale.getLanguage();
           String country = locale.getCountry();
           if ((language != null) && (language.length() > 0)) 
  -            templatePath.append("/").append(language);
  +            templatePath.append(PATH_SEPARATOR).append(language);
           if ((country != null) && (country.length() > 0)) 
  -            templatePath.append("/").append(country);
  +            templatePath.append(PATH_SEPARATOR).append(country);
   
           return  templatePath.toString();
       }
  
  
  

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


Mime
View raw message