Skip to content

Commit 7f6f95e

Browse files
committed
Merge branch '3.2.x' into 3.3.x
Closes gh-41828
2 parents fe55ce9 + 1360029 commit 7f6f95e

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

spring-boot-project/spring-boot-dependencies/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ bom {
915915
]
916916
}
917917
}
918-
library("Jetty", "12.0.11") {
918+
library("Jetty", "12.0.12") {
919919
group("org.eclipse.jetty.ee10") {
920920
imports = [
921921
"jetty-ee10-bom"

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyEmbeddedWebAppContext.java

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ void deferredInitialize() throws Exception {
4242
getContext().call(handler::deferredInitialize, null);
4343
}
4444

45+
@Override
46+
public String getCanonicalNameForTmpDir() {
47+
return super.getCanonicalNameForTmpDir();
48+
}
49+
4550
private static final class JettyEmbeddedServletHandler extends ServletHandler {
4651

4752
@Override

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java

+11-3
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,17 @@ private void addLocaleMappings(WebAppContext context) {
309309

310310
private File getTempDirectory(WebAppContext context) {
311311
String temp = System.getProperty("java.io.tmpdir");
312-
return (temp != null)
313-
? new File(temp, WebInfConfiguration.getCanonicalNameForWebAppTmpDir(context) + UUID.randomUUID())
314-
: null;
312+
return (temp != null) ? new File(temp, getTempDirectoryPrefix(context) + UUID.randomUUID()) : null;
313+
}
314+
315+
@SuppressWarnings("removal")
316+
private String getTempDirectoryPrefix(WebAppContext context) {
317+
try {
318+
return ((JettyEmbeddedWebAppContext) context).getCanonicalNameForTmpDir();
319+
}
320+
catch (Throwable ex) {
321+
return WebInfConfiguration.getCanonicalNameForWebAppTmpDir(context);
322+
}
315323
}
316324

317325
private void configureDocumentRoot(WebAppContext handler) {

0 commit comments

Comments
 (0)