Skip to content

Commit 235e693

Browse files
dreis2211snicoll
authored andcommitted
Fix WebappLoader constructor deprecations
See gh-20832
1 parent a2c67cd commit 235e693

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ protected void prepareContext(Host host, TomcatHttpHandlerAdapter servlet) {
149149
context.addLifecycleListener(new Tomcat.FixContextListener());
150150
context.setParentClassLoader(ClassUtils.getDefaultClassLoader());
151151
skipAllTldScanning(context);
152-
WebappLoader loader = new WebappLoader(context.getParentClassLoader());
152+
WebappLoader loader = new WebappLoader();
153153
loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName());
154154
loader.setDelegate(true);
155155
context.setLoader(loader);

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ protected void prepareContext(Host host, ServletContextInitializer[] initializer
222222
// Tomcat is < 8.5.39. Continue.
223223
}
224224
configureTldSkipPatterns(context);
225-
WebappLoader loader = new WebappLoader(context.getParentClassLoader());
225+
WebappLoader loader = new WebappLoader();
226226
loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName());
227227
loader.setDelegate(true);
228228
context.setLoader(loader);

0 commit comments

Comments
 (0)