File tree Expand file tree Collapse file tree
main/java/org/springframework/boot/context/properties/bind
test/java/org/springframework/boot/context/properties/bind Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333import org .springframework .boot .context .properties .source .IterableConfigurationPropertySource ;
3434import org .springframework .core .CollectionFactory ;
3535import org .springframework .core .ResolvableType ;
36- import org .springframework .util .ObjectUtils ;
3736
3837/**
3938 * {@link AggregateBinder} for Maps.
4039 *
4140 * @author Phillip Webb
4241 * @author Madhura Bhave
42+ * @author Ahmed El Amraouiyine
4343 */
4444class MapBinder extends AggregateBinder <Map <Object , Object >> {
4545
@@ -65,7 +65,7 @@ protected boolean isAllowRecursiveBinding(@Nullable ConfigurationPropertySource
6565 if (property != null ) {
6666 getContext ().setConfigurationProperty (property );
6767 Object result = getContext ().getPlaceholdersResolver ().resolvePlaceholders (property .getValue ());
68- if (ObjectUtils .isEmpty (result )) {
68+ if (result instanceof CharSequence charSequence && charSequence .isEmpty ()) {
6969 return createMap (target );
7070 }
7171 return getContext ().getConverter ().convert (result , target );
Original file line number Diff line number Diff line change 6565 *
6666 * @author Phillip Webb
6767 * @author Madhura Bhave
68+ * @author Ahmed El Amraouiyine
6869 */
6970class MapBinderTests {
7071
You can’t perform that action at this time.
0 commit comments