Don't report already migrated properties when has group
Refine the fix adding commit 962936370a so that items with a group
are correctly checked.
Fixes gh-42068
This commit is contained in:
@@ -146,7 +146,7 @@ class PropertiesMigrationReporter {
|
||||
|
||||
private boolean hasSameName(ConfigurationProperty property, ConfigurationMetadataProperty replacement) {
|
||||
return (property.getOrigin() instanceof PropertySourceOrigin propertySourceOrigin)
|
||||
&& Objects.equals(propertySourceOrigin.getPropertyName(), replacement.getName());
|
||||
&& Objects.equals(propertySourceOrigin.getPropertyName(), replacement.getId());
|
||||
}
|
||||
|
||||
private ConfigurationMetadataProperty determineReplacementMetadata(ConfigurationMetadataProperty metadata) {
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"groups": [
|
||||
{
|
||||
"name": "relaxed",
|
||||
"type": "com.example.SourceType"
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"name": "test.two",
|
||||
@@ -64,7 +70,8 @@
|
||||
},
|
||||
{
|
||||
"name": "relaxed.this-that-the-other",
|
||||
"type": "java.lang.String"
|
||||
"type": "java.lang.String",
|
||||
"sourceType": "com.example.SourceType"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user