NIFI-8431: remove redundant validation of dynamic properties
removed unused variable
Signed-off-by: Matthew Burgess <mattyb149@apache.org>
This closes #5045
diff --git a/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java b/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java
index 1daeb43..a14dcfc 100644
--- a/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java
+++ b/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java
@@ -20,7 +20,6 @@
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 @@
// 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 @@
}
}
- // 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()) {