Author: markt Date: Fri Jan 5 14:37:24 2018 New Revision: 1820302 URL: http://svn.apache.org/viewvc?rev=1820302&view=rev Log: Implement a small optimisation to how JAR URLs are processed to reduce the storage of duplicate String objects in memory. Patch provided by Dmitri Blinov.
Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/UriUtil.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/UriUtil.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/UriUtil.java?rev=1820302&r1=1820301&r2=1820302&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/buf/UriUtil.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/buf/UriUtil.java Fri Jan 5 14:37:24 2018 @@ -121,13 +121,12 @@ public final class UriUtil { public static URL buildJarUrl(String fileUrlString, String entryPath) throws MalformedURLException { String safeString = makeSafeForJarUrl(fileUrlString); StringBuilder sb = new StringBuilder(); - sb.append("jar:"); sb.append(safeString); sb.append("!/"); if (entryPath != null) { sb.append(makeSafeForJarUrl(entryPath)); } - return new URL(sb.toString()); + return new URL("jar", null, -1, sb.toString()); } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1820302&r1=1820301&r2=1820302&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 5 14:37:24 2018 @@ -47,6 +47,11 @@ <section name="Tomcat 9.0.3 (markt)" rtext="in development"> <subsection name="Catalina"> <changelog> + <add> + <bug>57619</bug>: Implement a small optimisation to how JAR URLs are + processed to reduce the storage of duplicate String objects in memory. + Patch provided by Dmitri Blinov. (markt) + </add> <fix> Add some missing NPEs to ServletContext. (remm) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org