This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new f1295ac538 Fix logic bug - with thanks to Tom Whitmore. f1295ac538 is described below commit f1295ac538539c2d80d67dbfff72a52799b471d2 Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Mar 27 16:30:39 2023 +0100 Fix logic bug - with thanks to Tom Whitmore. --- java/org/apache/catalina/webresources/CachedResource.java | 4 ++-- webapps/docs/changelog.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/webresources/CachedResource.java b/java/org/apache/catalina/webresources/CachedResource.java index f4894c7172..d8c02915b2 100644 --- a/java/org/apache/catalina/webresources/CachedResource.java +++ b/java/org/apache/catalina/webresources/CachedResource.java @@ -472,7 +472,7 @@ public class CachedResource implements WebResource { @Override protected boolean equals(URL u1, URL u2) { // Deliberate use of == - if (resourceURL == u1) { + if (associatedURL == u1) { return resourceURL.equals(u2); } // Not the original resourceURL. Use the default implementation from URLStreamHandler. @@ -489,7 +489,7 @@ public class CachedResource implements WebResource { @Override protected int hashCode(URL u) { // Deliberate use of == - if (resourceURL == u) { + if (associatedURL == u) { return resourceURL.hashCode(); } // Not the original resourceURL. Use the default implementation from URLStreamHandler. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 71d5c6f2c4..0cde954a66 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -152,7 +152,8 @@ and <code>hashcode()</code> algorithms, if present, will now be used for URLs for these resources. This addresses a potential performance issue with some OSGi custom URL schemes that can trigger potentially slow DNS - lookups in some configurations. (markt) + lookups in some configurations. Based on a patch provided by Tom + Whitmore. (markt) </fix> <fix> When using a custom session manager deployed as part of the web --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org