diff --git a/spring-boot-test/src/main/java/org/springframework/boot/test/util/TestPropertyValues.java b/spring-boot-test/src/main/java/org/springframework/boot/test/util/TestPropertyValues.java index 2c9ed9aabb0..f86d9b60db9 100644 --- a/spring-boot-test/src/main/java/org/springframework/boot/test/util/TestPropertyValues.java +++ b/spring-boot-test/src/main/java/org/springframework/boot/test/util/TestPropertyValues.java @@ -284,13 +284,10 @@ public final class TestPropertyValues { */ private class SystemPropertiesHandler implements Closeable { - private final Map properties; - private final Map previous; SystemPropertiesHandler() { - this.properties = new LinkedHashMap<>(TestPropertyValues.this.properties); - this.previous = apply(this.properties); + this.previous = apply(TestPropertyValues.this.properties); } private Map apply(Map properties) {