Author: markt Date: Mon Aug 11 10:39:20 2014 New Revision: 1617242 URL: http://svn.apache.org/r1617242 Log: This can get called a lot and this appears to be marginally faster
Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1617242&r1=1617241&r2=1617242&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Aug 11 10:39:20 2014 @@ -2501,8 +2501,8 @@ public class WebappClassLoader extends U private String binaryNameToPath(String binaryName, boolean withLeadingSlash) { - StringBuilder path = new StringBuilder( - 1 + binaryName.length() + CLASS_FILE_SUFFIX.length()); + // 1 for leading '/', 6 for ".class" + StringBuilder path = new StringBuilder(7 + binaryName.length()); if (withLeadingSlash) { path.append('/'); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org