Bug 47826

Summary: a logging statement error in org.apache.catalina.startup.Bootstrap.java
Product: Tomcat 6 Reporter: qingyang.xu <qingyang.xu>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: P2    
Version: 6.0.20   
Target Milestone: default   
Hardware: PC   
OS: Linux   

Description qingyang.xu 2009-09-11 17:39:34 UTC
// Local repository
            boolean replace = false;
            String before = repository;
            while ((i=repository.indexOf(CATALINA_HOME_TOKEN))>=0) {
                replace=true;
                if (i>0) {
                repository = repository.substring(0,i) + getCatalinaHome() 
                    + repository.substring(i+CATALINA_HOME_TOKEN.length());
                } else {
                    repository = getCatalinaHome() 
                        + repository.substring(CATALINA_HOME_TOKEN.length());
                }
            }
            while ((i=repository.indexOf(CATALINA_BASE_TOKEN))>=0) {
                replace=true;
                if (i>0) {
                repository = repository.substring(0,i) + getCatalinaBase() 
                    + repository.substring(i+CATALINA_BASE_TOKEN.length());
                } else {
                    repository = getCatalinaBase() 
                        + repository.substring(CATALINA_BASE_TOKEN.length());
                }
            }
            if (replace && log.isDebugEnabled())
                log.debug("Expanded " + before + " to " + replace);

The last line should be: "log.debug("Expanded " + before + " to " + repository);"
Comment 1 Mark Thomas 2009-09-20 14:57:35 UTC
This has been fixed in 6.0.x and will be in 6.0.21 onwards.
Comment 2 Konstantin Kolinko 2009-10-04 13:41:27 UTC
Fixed in 5.5 as well, will be in 5.5.29. Thank you for the report.