|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2019 the original author or authors. |
| 2 | + * Copyright 2012-2020 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
25 | 25 |
|
26 | 26 | import org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty;
|
27 | 27 | import org.springframework.boot.configurationmetadata.ConfigurationMetadataRepository;
|
28 |
| -import org.springframework.boot.configurationmetadata.Deprecation; |
29 | 28 | import org.springframework.boot.context.properties.source.ConfigurationProperty;
|
30 | 29 | import org.springframework.boot.context.properties.source.ConfigurationPropertyName;
|
31 | 30 | import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
|
@@ -62,7 +61,8 @@ class PropertiesMigrationReporter {
|
62 | 61 | */
|
63 | 62 | PropertiesMigrationReport getReport() {
|
64 | 63 | PropertiesMigrationReport report = new PropertiesMigrationReport();
|
65 |
| - Map<String, List<PropertyMigration>> properties = getMatchingProperties(deprecatedFilter()); |
| 64 | + Map<String, List<PropertyMigration>> properties = getMatchingProperties( |
| 65 | + ConfigurationMetadataProperty::isDeprecated); |
66 | 66 | if (properties.isEmpty()) {
|
67 | 67 | return report;
|
68 | 68 | }
|
@@ -129,11 +129,6 @@ private ConfigurationMetadataProperty detectMapValueReplacement(String fullId) {
|
129 | 129 | return null;
|
130 | 130 | }
|
131 | 131 |
|
132 |
| - private Predicate<ConfigurationMetadataProperty> deprecatedFilter() { |
133 |
| - return (property) -> property.getDeprecation() != null |
134 |
| - && property.getDeprecation().getLevel() == Deprecation.Level.ERROR; |
135 |
| - } |
136 |
| - |
137 | 132 | private Map<String, ConfigurationPropertySource> getPropertySourcesAsMap() {
|
138 | 133 | Map<String, ConfigurationPropertySource> map = new LinkedHashMap<>();
|
139 | 134 | for (ConfigurationPropertySource source : ConfigurationPropertySources.get(this.environment)) {
|
|
0 commit comments