Browse Source

Fix cache sizing bug

Fix a cache size bug in `DefaultPropertyMapper` which caused the
cache to be purged immediately.

See gh-9000
pull/9050/merge
Phillip Webb 9 years ago
parent
commit
53fd1f7f2e
  1. 2
      spring-boot/src/main/java/org/springframework/boot/context/properties/source/DefaultPropertyMapper.java

2
spring-boot/src/main/java/org/springframework/boot/context/properties/source/DefaultPropertyMapper.java

@ -89,7 +89,7 @@ class DefaultPropertyMapper implements PropertyMapper { @@ -89,7 +89,7 @@ class DefaultPropertyMapper implements PropertyMapper {
@Override
protected boolean removeEldestEntry(Map.Entry<K, List<PropertyMapping>> eldest) {
return size() >= this.capacity;
return size() > this.capacity;
}

Loading…
Cancel
Save