Polish "Resolved nested placeholder for CharSequence"
See gh-32876
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -84,8 +84,10 @@ public class PropertySourcesPropertyResolver extends AbstractPropertyResolver {
|
||||
}
|
||||
Object value = propertySource.getProperty(key);
|
||||
if (value != null) {
|
||||
if (resolveNestedPlaceholders && value instanceof String string) {
|
||||
value = resolveNestedPlaceholders(string);
|
||||
if (resolveNestedPlaceholders &&
|
||||
(String.class.equals(targetValueType) || CharSequence.class.equals(targetValueType)) &&
|
||||
value instanceof CharSequence cs) {
|
||||
value = resolveNestedPlaceholders(cs.toString());
|
||||
}
|
||||
logKeyFound(key, propertySource, value);
|
||||
return convertValueIfNecessary(value, targetValueType);
|
||||
|
||||
Reference in New Issue
Block a user