Skip to content

Commit e950a08

Browse files
committed
Fix casing of ServerProperties.Jetty.Accesslog.FORMAT
Closes gh-45884
1 parent ab1dec0 commit e950a08

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ public static class Accesslog {
12611261
/**
12621262
* Log format.
12631263
*/
1264-
private FORMAT format = FORMAT.NCSA;
1264+
private Format format = Format.NCSA;
12651265

12661266
/**
12671267
* Custom log format, see org.eclipse.jetty.server.CustomRequestLog. If
@@ -1302,11 +1302,11 @@ public void setEnabled(boolean enabled) {
13021302
this.enabled = enabled;
13031303
}
13041304

1305-
public FORMAT getFormat() {
1305+
public Format getFormat() {
13061306
return this.format;
13071307
}
13081308

1309-
public void setFormat(FORMAT format) {
1309+
public void setFormat(Format format) {
13101310
this.format = format;
13111311
}
13121312

@@ -1361,7 +1361,7 @@ public void setIgnorePaths(List<String> ignorePaths) {
13611361
/**
13621362
* Log format for Jetty access logs.
13631363
*/
1364-
public enum FORMAT {
1364+
public enum Format {
13651365

13661366
/**
13671367
* NCSA format, as defined in CustomRequestLog#NCSA_FORMAT.

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@
3333
import org.eclipse.jetty.server.RequestLogWriter;
3434

3535
import org.springframework.boot.autoconfigure.web.ServerProperties;
36+
import org.springframework.boot.autoconfigure.web.ServerProperties.Jetty.Accesslog.Format;
3637
import org.springframework.boot.cloud.CloudPlatform;
3738
import org.springframework.boot.context.properties.PropertyMapper;
3839
import org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory;
@@ -201,7 +202,7 @@ private String getLogFormat(ServerProperties.Jetty.Accesslog properties) {
201202
if (properties.getCustomFormat() != null) {
202203
return properties.getCustomFormat();
203204
}
204-
if (ServerProperties.Jetty.Accesslog.FORMAT.EXTENDED_NCSA.equals(properties.getFormat())) {
205+
if (Format.EXTENDED_NCSA.equals(properties.getFormat())) {
205206
return CustomRequestLog.EXTENDED_NCSA_FORMAT;
206207
}
207208
return CustomRequestLog.NCSA_FORMAT;

0 commit comments

Comments
 (0)