Allow to provide manual metadata for keys that are not unique
Closes gh-12193
This commit is contained in:
@@ -150,6 +150,10 @@ public class ConfigurationMetadata {
|
||||
return null;
|
||||
}
|
||||
candidates.removeIf((itemMetadata) -> !itemMetadata.hasSameType(metadata));
|
||||
if (candidates.size() > 1 && metadata.getType() != null) {
|
||||
candidates.removeIf((itemMetadata) ->
|
||||
!metadata.getType().equals(itemMetadata.getType()));
|
||||
}
|
||||
if (candidates.size() == 1) {
|
||||
return candidates.get(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user