From 062b73f4a43b2f36e3f0030a06a7b73cec8dde75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Tue, 18 Feb 2025 10:59:52 +0100 Subject: [PATCH] Polish contribution See gh-44310 --- .../context/ReactiveWebServerApplicationContext.java | 6 +++--- .../servlet/context/ServletWebServerApplicationContext.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java index 8c787dd995a..9e6bef52194 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerApplicationContext.java @@ -65,7 +65,7 @@ public class ReactiveWebServerApplicationContext extends GenericReactiveWebAppli try { super.refresh(); } - catch (RuntimeException refreshEx) { + catch (RuntimeException ex) { WebServer webServer = getWebServer(); if (webServer != null) { try { @@ -73,10 +73,10 @@ public class ReactiveWebServerApplicationContext extends GenericReactiveWebAppli webServer.destroy(); } catch (RuntimeException stopOrDestroyEx) { - refreshEx.addSuppressed(stopOrDestroyEx); + ex.addSuppressed(stopOrDestroyEx); } } - throw refreshEx; + throw ex; } } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java index 2555919b957..cc8e6a9650b 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java @@ -145,7 +145,7 @@ public class ServletWebServerApplicationContext extends GenericWebApplicationCon try { super.refresh(); } - catch (RuntimeException refreshEx) { + catch (RuntimeException ex) { try { WebServer webServer = this.webServer; if (webServer != null) { @@ -154,9 +154,9 @@ public class ServletWebServerApplicationContext extends GenericWebApplicationCon } } catch (RuntimeException stopOrDestroyEx) { - refreshEx.addSuppressed(stopOrDestroyEx); + ex.addSuppressed(stopOrDestroyEx); } - throw refreshEx; + throw ex; } }