File tree 2 files changed +1
-27
lines changed
main/java/org/springframework/core/env
test/java/org/springframework/core/env
2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change 24
24
*
25
25
* @author Chris Beams
26
26
* @author Juergen Hoeller
27
- * @author Yanming Zhou
28
27
* @since 3.1
29
28
* @see PropertySource
30
29
* @see PropertySources
Original file line number Diff line number Diff line change 34
34
35
35
/**
36
36
* @author Chris Beams
37
- * @author Yanming Zhou
38
37
* @since 3.1
39
38
*/
40
39
class PropertySourcesPropertyResolverTests {
@@ -307,31 +306,7 @@ void resolveNestedPlaceholdersIfValueIsCharSequence() {
307
306
ps .addFirst (new MockPropertySource ()
308
307
.withProperty ("p1" , "v1" )
309
308
.withProperty ("p2" , "v2" )
310
- .withProperty ("p3" , new CharSequence () {
311
-
312
- static final String underlying = "${p1}:${p2}" ;
313
-
314
- @ Override
315
- public int length () {
316
- return underlying .length ();
317
- }
318
-
319
- @ Override
320
- public char charAt (int index ) {
321
- return underlying .charAt (index );
322
- }
323
-
324
- @ Override
325
- public CharSequence subSequence (int start , int end ) {
326
- return underlying .subSequence (start , end );
327
- }
328
-
329
- @ Override
330
- public String toString () {
331
- return underlying ;
332
- }
333
- })
334
- );
309
+ .withProperty ("p3" , new StringBuilder ("${p1}:${p2}" )));
335
310
ConfigurablePropertyResolver pr = new PropertySourcesPropertyResolver (ps );
336
311
assertThat (pr .getProperty ("p1" )).isEqualTo ("v1" );
337
312
assertThat (pr .getProperty ("p2" )).isEqualTo ("v2" );
You can’t perform that action at this time.
0 commit comments