|
23 | 23 | import java.util.Map;
|
24 | 24 | import java.util.Set;
|
25 | 25 | import java.util.function.Predicate;
|
26 |
| -import java.util.stream.Collectors; |
27 | 26 |
|
28 | 27 | import org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty;
|
29 | 28 | import org.springframework.boot.configurationmetadata.ConfigurationMetadataRepository;
|
@@ -82,9 +81,7 @@ PropertiesMigrationReport getReport() {
|
82 | 81 | private PropertySource<?> mapPropertiesWithReplacement(PropertiesMigrationReport report, String name,
|
83 | 82 | List<PropertyMigration> properties) {
|
84 | 83 | report.add(name, properties);
|
85 |
| - List<PropertyMigration> renamed = properties.stream() |
86 |
| - .filter(PropertyMigration::isCompatibleType) |
87 |
| - .collect(Collectors.toList()); |
| 84 | + List<PropertyMigration> renamed = properties.stream().filter(PropertyMigration::isCompatibleType).toList(); |
88 | 85 | if (renamed.isEmpty()) {
|
89 | 86 | return null;
|
90 | 87 | }
|
@@ -118,10 +115,7 @@ private boolean isMapType(ConfigurationMetadataProperty property) {
|
118 | 115 | private Map<String, List<PropertyMigration>> getMatchingProperties(
|
119 | 116 | Predicate<ConfigurationMetadataProperty> filter) {
|
120 | 117 | MultiValueMap<String, PropertyMigration> result = new LinkedMultiValueMap<>();
|
121 |
| - List<ConfigurationMetadataProperty> candidates = this.allProperties.values() |
122 |
| - .stream() |
123 |
| - .filter(filter) |
124 |
| - .collect(Collectors.toList()); |
| 118 | + List<ConfigurationMetadataProperty> candidates = this.allProperties.values().stream().filter(filter).toList(); |
125 | 119 | getPropertySourcesAsMap().forEach((propertySourceName, propertySource) -> candidates.forEach((metadata) -> {
|
126 | 120 | ConfigurationPropertyName metadataName = ConfigurationPropertyName.isValid(metadata.getId())
|
127 | 121 | ? ConfigurationPropertyName.of(metadata.getId())
|
|
0 commit comments