Merge branch '2.6.x' into 2.7.x

Closes gh-31525
This commit is contained in:
Andy Wilkinson
2022-06-24 13:05:06 +01:00
29 changed files with 411 additions and 410 deletions

View File

@@ -356,12 +356,12 @@ public class SpringApplication {
private Class<? extends StandardEnvironment> deduceEnvironmentClass() {
switch (this.webApplicationType) {
case SERVLET:
return ApplicationServletEnvironment.class;
case REACTIVE:
return ApplicationReactiveWebEnvironment.class;
default:
return ApplicationEnvironment.class;
case SERVLET:
return ApplicationServletEnvironment.class;
case REACTIVE:
return ApplicationReactiveWebEnvironment.class;
default:
return ApplicationEnvironment.class;
}
}
@@ -457,12 +457,12 @@ public class SpringApplication {
return this.environment;
}
switch (this.webApplicationType) {
case SERVLET:
return new ApplicationServletEnvironment();
case REACTIVE:
return new ApplicationReactiveWebEnvironment();
default:
return new ApplicationEnvironment();
case SERVLET:
return new ApplicationServletEnvironment();
case REACTIVE:
return new ApplicationReactiveWebEnvironment();
default:
return new ApplicationEnvironment();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 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.
@@ -245,23 +245,23 @@ public class DeferredLog implements Log {
static void logTo(Log log, LogLevel level, Object message, Throwable throwable) {
switch (level) {
case TRACE:
log.trace(message, throwable);
return;
case DEBUG:
log.debug(message, throwable);
return;
case INFO:
log.info(message, throwable);
return;
case WARN:
log.warn(message, throwable);
return;
case ERROR:
log.error(message, throwable);
return;
case FATAL:
log.fatal(message, throwable);
case TRACE:
log.trace(message, throwable);
return;
case DEBUG:
log.debug(message, throwable);
return;
case INFO:
log.info(message, throwable);
return;
case WARN:
log.warn(message, throwable);
return;
case ERROR:
log.error(message, throwable);
return;
case FATAL:
log.fatal(message, throwable);
}
}

View File

@@ -717,12 +717,12 @@ public class JettyServletWebServerFactory extends AbstractServletWebServerFactor
private String getSameSiteComment(SameSite sameSite) {
switch (sameSite) {
case NONE:
return HttpCookie.SAME_SITE_NONE_COMMENT;
case LAX:
return HttpCookie.SAME_SITE_LAX_COMMENT;
case STRICT:
return HttpCookie.SAME_SITE_STRICT_COMMENT;
case NONE:
return HttpCookie.SAME_SITE_NONE_COMMENT;
case LAX:
return HttpCookie.SAME_SITE_LAX_COMMENT;
case STRICT:
return HttpCookie.SAME_SITE_STRICT_COMMENT;
}
throw new IllegalStateException("Unsupported SameSite value " + sameSite);
}