> 2022年11月17日 00:19,ma...@apache.org 写道:
>
> 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 a52538baad URI(String) can also throw an IAE
> a52538baad is described below
>
> commit a52538baadbd355837526f00f3ecae0c33d23660
> Author: Mark Thomas <ma...@apache.org>
> AuthorDate: Wed Nov 16 16:19:02 2022 +0000
>
> URI(String) can also throw an IAE
> ---
> java/org/apache/catalina/startup/Bootstrap.java | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/java/org/apache/catalina/startup/Bootstrap.java
> b/java/org/apache/catalina/startup/Bootstrap.java
> index 2f8999a829..461d54b304 100644
> --- a/java/org/apache/catalina/startup/Bootstrap.java
> +++ b/java/org/apache/catalina/startup/Bootstrap.java
> @@ -179,7 +179,7 @@ public final class Bootstrap {
> URL url = uri.toURL();
> repositories.add(new Repository(repository,
> RepositoryType.URL));
> continue;
> - } catch (MalformedURLException | URISyntaxException e) {
> + } catch (IllegalArgumentException | MalformedURLException |
> URISyntaxException e) {
I think that we can use URI#create factory method instead of manually invoke
constructor so that we need only caught IAE.
Han
> // Ignore
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org