When checking that referenced Controller Services are valid, use ValidationContext.getProperties() rather than ComponentNode.getSupportedPropertyDescriptors() because the latter does not include dynamic properties
This closes
@@ -676,13 +676,13 @@ public abstract class AbstractComponentNode implements ComponentNode {
}
protected final Collection<ValidationResult> validateReferencedControllerServices(final ValidationContext validationContext) {
- final List<PropertyDescriptor> supportedDescriptors = getComponent().getPropertyDescriptors();
- if (supportedDescriptors == null) {
+ final Set<PropertyDescriptor> propertyDescriptors = validationContext.getProperties().keySet();
+ if (propertyDescriptors == null) {
return Collections.emptyList();
}
final Collection<ValidationResult> validationResults = new ArrayList<>();
- for (final PropertyDescriptor descriptor : supportedDescriptors) {
+ for (final PropertyDescriptor descriptor : propertyDescriptors) {
if (descriptor.getControllerServiceDefinition() == null) {
// skip properties that aren't for a controller service
continue;
