From 53fd1f7f2e34c70008553640fdf2123e41a02592 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 1 May 2017 20:12:56 -0700 Subject: [PATCH] Fix cache sizing bug Fix a cache size bug in `DefaultPropertyMapper` which caused the cache to be purged immediately. See gh-9000 --- .../boot/context/properties/source/DefaultPropertyMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/context/properties/source/DefaultPropertyMapper.java b/spring-boot/src/main/java/org/springframework/boot/context/properties/source/DefaultPropertyMapper.java index bb60f04a9bf..34111a6ab9a 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/properties/source/DefaultPropertyMapper.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/properties/source/DefaultPropertyMapper.java @@ -89,7 +89,7 @@ class DefaultPropertyMapper implements PropertyMapper { @Override protected boolean removeEldestEntry(Map.Entry> eldest) { - return size() >= this.capacity; + return size() > this.capacity; }