From f42fe5f8e5efee9e4207ee64662063b04826c2e6 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Thu, 11 May 2017 19:08:58 -0700 Subject: [PATCH] Polish --- .../boot/context/properties/bind/MapBinder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java b/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java index 2faa3e5680..8ccb23bda9 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java @@ -37,6 +37,9 @@ import org.springframework.core.ResolvableType; */ class MapBinder extends AggregateBinder> { + private static final Bindable> STRING_STRING_MAP = Bindable + .mapOf(String.class, String.class); + MapBinder(BindContext context) { super(context); } @@ -58,7 +61,7 @@ class MapBinder extends AggregateBinder> { private Bindable resolveTarget(Bindable target) { Class type = target.getType().resolve(); if (Properties.class.isAssignableFrom(type)) { - return Bindable.mapOf(String.class, String.class); + return STRING_STRING_MAP; } return target; }