This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new df4ee59e13 Handle IAE when processing URIs
df4ee59e13 is described below
commit df4ee59e13e204550c8815e9a37d5047ec5ff279
Author: remm <[email protected]>
AuthorDate: Wed Nov 12 16:59:38 2025 +0100
Handle IAE when processing URIs
new File(URI) throws IAEs in many cases, so skip in those cases.
BZ69877
---
java/org/apache/catalina/loader/WebappLoader.java | 3 ++-
webapps/docs/changelog.xml | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/loader/WebappLoader.java
b/java/org/apache/catalina/loader/WebappLoader.java
index 55a18b1527..fb69b84828 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -578,8 +578,9 @@ public class WebappLoader extends LifecycleMBeanBase
implements Loader, Property
try {
File f = new File(url.toURI());
repository = f.getAbsolutePath();
- } catch (URISyntaxException e) {
+ } catch (URISyntaxException | IllegalArgumentException e) {
// Can't convert from URL to URI. Treat as non-file
URL and skip.
+ continue;
}
} else {
continue;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 280825b474..9944202fed 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -113,6 +113,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>69877</bug>: Catch IllegalArgumentException when processing URIs
+ when creating the classpath to handle invalid URIs. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Clustering">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]