Skip to content

Commit 7a91fa9

Browse files
committed
Merge branch '2.6.x' into 2.7.x
Closes spring-projectsgh-32145
2 parents 392aec4 + 463766f commit 7a91fa9

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/netty/NettyProperties.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 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.
@@ -30,9 +30,11 @@
3030
public class NettyProperties {
3131

3232
/**
33-
* Level of leak detection for reference-counted buffers.
33+
* Level of leak detection for reference-counted buffers. If not configured via
34+
* 'ResourceLeakDetector.setLevel' or the 'io.netty.leakDetection.level' system
35+
* property, default to 'simple'.
3436
*/
35-
private LeakDetection leakDetection = LeakDetection.SIMPLE;
37+
private LeakDetection leakDetection;
3638

3739
public LeakDetection getLeakDetection() {
3840
return this.leakDetection;

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,10 +1862,6 @@
18621862
"name": "spring.neo4j.uri",
18631863
"defaultValue": "bolt://localhost:7687"
18641864
},
1865-
{
1866-
"name": "spring.netty.leak-detection",
1867-
"defaultValue": "simple"
1868-
},
18691865
{
18701866
"name": "spring.quartz.jdbc.comment-prefix",
18711867
"defaultValue": [

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/netty/NettyPropertiesTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 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.
@@ -32,11 +32,10 @@
3232
class NettyPropertiesTests {
3333

3434
@Test
35-
void defaultValueShouldMatchNettys() {
36-
NettyProperties properties = new NettyProperties();
35+
void defaultValueShouldBeConsistent() {
3736
ResourceLeakDetector.Level defaultLevel = (Level) ReflectionTestUtils.getField(ResourceLeakDetector.class,
3837
"DEFAULT_LEVEL");
39-
assertThat(ResourceLeakDetector.Level.valueOf(properties.getLeakDetection().name())).isEqualTo(defaultLevel);
38+
assertThat(defaultLevel).isEqualTo(Level.SIMPLE);
4039
}
4140

4241
}

0 commit comments

Comments
 (0)