@@ -389,7 +389,9 @@ public static void addInlinedPropertiesToEnvironment(ConfigurableEnvironment env
389
389
*/
390
390
public static Map <String , Object > convertInlinedPropertiesToMap (String ... inlinedProperties ) {
391
391
Assert .notNull (inlinedProperties , "'inlinedProperties' must not be null" );
392
- SequencedProperties sequencedProperties = new SequencedProperties ();
392
+
393
+ LinkedHashMap <String , Object > map = new LinkedHashMap <>();
394
+ SequencedProperties sequencedProperties = new SequencedProperties (map );
393
395
394
396
for (String input : inlinedProperties ) {
395
397
if (!StringUtils .hasText (input )) {
@@ -403,7 +405,7 @@ public static Map<String, Object> convertInlinedPropertiesToMap(String... inline
403
405
}
404
406
}
405
407
406
- return sequencedProperties . map ;
408
+ return map ;
407
409
}
408
410
409
411
private static <T extends Annotation > List <List <MergedAnnotation <T >>> findRepeatableAnnotations (
@@ -452,14 +454,17 @@ private static <A extends Annotation> Comparator<MergedAnnotation<A>> highMetaDi
452
454
453
455
/**
454
456
* Extension of {@link Properties} that mimics a {@code SequencedMap} by
455
- * tracking all added properties in a {@link LinkedHashMap} that can be
456
- * accessed directly via the {@code map} field.
457
+ * tracking all added properties in the supplied {@link LinkedHashMap}.
457
458
* @since 6.1
458
459
*/
459
460
@ SuppressWarnings ("serial" )
460
461
private static class SequencedProperties extends Properties {
461
462
462
- final Map <String , Object > map = new LinkedHashMap <>();
463
+ private final LinkedHashMap <String , Object > map ;
464
+
465
+ SequencedProperties (LinkedHashMap <String , Object > map ) {
466
+ this .map = map ;
467
+ }
463
468
464
469
@ Override
465
470
public synchronized Object put (Object key , Object value ) {
0 commit comments