This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 2035afa538 Add an additional test
2035afa538 is described below
commit 2035afa53898b2f61aaf82d756b0542ba9dba1e5
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Mar 31 16:59:19 2025 +0100
Add an additional test
---
.../org/apache/catalina/loader/TestWebappClassLoader.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/test/org/apache/catalina/loader/TestWebappClassLoader.java
b/test/org/apache/catalina/loader/TestWebappClassLoader.java
index ed3df9f562..c38a3bec3a 100644
--- a/test/org/apache/catalina/loader/TestWebappClassLoader.java
+++ b/test/org/apache/catalina/loader/TestWebappClassLoader.java
@@ -189,6 +189,21 @@ public class TestWebappClassLoader extends TomcatBaseTest {
}
+ @Test
+ public void testResourceNameEmptyString() throws Exception {
+ Tomcat tomcat = getTomcatInstance();
+ getProgrammaticRootContext();
+ tomcat.start();
+
+ // Add an external resource to the web application
+ WebappClassLoaderBase cl =
+ (WebappClassLoaderBase) ((Context)
tomcat.getHost().findChildren()[0]).getLoader().getClassLoader();
+
+ URL u1 = cl.getResource("");
+ Assert.assertNotNull(u1);
+ }
+
+
@Test
public void testFindResourceNull() throws Exception {
Tomcat tomcat = getTomcatInstanceTestWebapp(false, true);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]