From 235e693906859795aa250c2284a02edbc3a3fbf9 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Sat, 4 Apr 2020 10:20:58 +0200 Subject: [PATCH 1/2] Fix WebappLoader constructor deprecations See gh-20832 --- .../web/embedded/tomcat/TomcatReactiveWebServerFactory.java | 2 +- .../boot/web/embedded/tomcat/TomcatServletWebServerFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java index fb22457e3d..8fb87ca287 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java @@ -149,7 +149,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac context.addLifecycleListener(new Tomcat.FixContextListener()); context.setParentClassLoader(ClassUtils.getDefaultClassLoader()); skipAllTldScanning(context); - WebappLoader loader = new WebappLoader(context.getParentClassLoader()); + WebappLoader loader = new WebappLoader(); loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName()); loader.setDelegate(true); context.setLoader(loader); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java index c83cc58b51..71b2f02e7f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java @@ -222,7 +222,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto // Tomcat is < 8.5.39. Continue. } configureTldSkipPatterns(context); - WebappLoader loader = new WebappLoader(context.getParentClassLoader()); + WebappLoader loader = new WebappLoader(); loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName()); loader.setDelegate(true); context.setLoader(loader); From cb66e4a206a37e9fd2874d738398a2cc0c9bb971 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 7 Apr 2020 15:09:27 +0200 Subject: [PATCH 2/2] Update copyright year See gh-20832 --- .../boot/web/embedded/tomcat/TomcatServletWebServerFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java index 71b2f02e7f..109287008f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.