This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new af62dea83f Fix logic bug - with thanks to Tom Whitmore.
af62dea83f is described below
commit af62dea83f1222de49b4b654051ea91248e5517f
Author: Mark Thomas <[email protected]>
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 b403d9f753..e7919383eb 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -157,7 +157,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: [email protected]
For additional commands, e-mail: [email protected]