On 19/09/2023 13:09, r...@apache.org wrote:
This is an automated email from the ASF dual-hosted git repository.
remm 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 93d392e475 Avoid needless exception wrapping
93d392e475 is described below
commit 93d392e4755c0c703318fbe5351934392dd1476f
Author: remm <r...@apache.org>
AuthorDate: Tue Sep 19 14:09:17 2023 +0200
Avoid needless exception wrapping
---
java/org/apache/tomcat/util/net/AbstractEndpoint.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index 0ce6c92ddb..e75827d5e1 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -296,6 +296,9 @@ public abstract class AbstractEndpoint<S,U> {
try {
createSSLContext(sslHostConfig);
} catch (Exception e) {
+ if (e instanceof IllegalArgumentException) {
+ throw e;
+ }
would
} catch (IllegalArgumentException e) {
throw e;
} catch (Exception e) {
throw new IllegalArgumentException(e);
}
Be more compact / clearer to read?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org