Skip to content

Commit df4ee59

Browse files
committed
Handle IAE when processing URIs
new File(URI) throws IAEs in many cases, so skip in those cases. BZ69877
1 parent 03e6e54 commit df4ee59

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

java/org/apache/catalina/loader/WebappLoader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,9 @@ private boolean buildClassPath(StringBuilder classpath, ClassLoader loader) {
578578
try {
579579
File f = new File(url.toURI());
580580
repository = f.getAbsolutePath();
581-
} catch (URISyntaxException e) {
581+
} catch (URISyntaxException | IllegalArgumentException e) {
582582
// Can't convert from URL to URI. Treat as non-file URL and skip.
583+
continue;
583584
}
584585
} else {
585586
continue;

webapps/docs/changelog.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@
113113
</fix>
114114
</changelog>
115115
</subsection>
116+
<subsection name="Jasper">
117+
<changelog>
118+
<fix>
119+
<bug>69877</bug>: Catch IllegalArgumentException when processing URIs
120+
when creating the classpath to handle invalid URIs. (remm)
121+
</fix>
122+
</changelog>
123+
</subsection>
116124
<subsection name="Clustering">
117125
<changelog>
118126
<fix>

0 commit comments

Comments
 (0)