remove redundant validation of dynamic properties
removed unused variable
This closes
@@ -20,7 +20,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
-import java.util.Map;
import java.util.Set;
public abstract class AbstractConfigurableComponent implements ConfigurableComponent {
@@ -93,7 +92,6 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo
// goes through context properties, should match supported properties + supported dynamic properties
final Collection<ValidationResult> results = new ArrayList<>();
final Set<PropertyDescriptor> contextDescriptors = context.getProperties().keySet();
- final List<PropertyDescriptor> supportedDescriptors = getSupportedPropertyDescriptors();
for (final PropertyDescriptor descriptor : contextDescriptors) {
// If the property descriptor's dependency is not satisfied, the property does not need to be considered, as it's not relevant to the
@@ -126,19 +124,6 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo
}
}
- // validate any dynamic properties
- for (final Map.Entry<PropertyDescriptor, String> entry : context.getProperties().entrySet()) {
- final PropertyDescriptor descriptor = entry.getKey();
- final String value = entry.getValue();
-
- if (supportedDescriptors != null && !supportedDescriptors.contains(descriptor)) {
- final ValidationResult result = descriptor.validate(value, context);
- if (!result.isValid()) {
- results.add(result);
- }
- }
- }
-
// only run customValidate if regular validation is successful. This allows Processor developers to not have to check
// if values are null or invalid so that they can focus only on the interaction between the properties, etc.
if (results.isEmpty()) {
