This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 01aff530a2 Use finally for init
01aff530a2 is described below
commit 01aff530a2e72aeed8e2662e602e6b6511ec0090
Author: remm <[email protected]>
AuthorDate: Wed Oct 30 10:01:53 2024 +0100
Use finally for init
---
.../org/apache/coyote/http11/AbstractHttp11Protocol.java | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index 4110488a88..b5f2dd2406 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -78,13 +78,15 @@ public abstract class AbstractHttp11Protocol<S> extends
AbstractProtocol<S> {
configureUpgradeProtocol(upgradeProtocol);
}
- super.init();
-
- // Set the Http11Protocol (i.e. this) for any upgrade protocols once
- // this has completed initialisation as the upgrade protocols may
expect this
- // to be initialised when the call is made
- for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
- upgradeProtocol.setHttp11Protocol(this);
+ try {
+ super.init();
+ } finally {
+ // Set the Http11Protocol (i.e. this) for any upgrade protocols
once
+ // this has completed initialisation as the upgrade protocols may
expect this
+ // to be initialised when the call is made
+ for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
+ upgradeProtocol.setHttp11Protocol(this);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]