mirror of https://github.com/apache/nifi.git
NIFI-2684 - Change AbstractConfigurableComponent to use displayName when available
This commit is contained in:
parent
8f928e5d6e
commit
ef2c50577d
|
@ -91,7 +91,9 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo
|
||||||
value = descriptor.getDefaultValue();
|
value = descriptor.getDefaultValue();
|
||||||
}
|
}
|
||||||
if (value == null && descriptor.isRequired()) {
|
if (value == null && descriptor.isRequired()) {
|
||||||
results.add(new ValidationResult.Builder().valid(false).input(null).subject(descriptor.getName()).explanation(descriptor.getName() + " is required").build());
|
ValidationResult.Builder builder = new ValidationResult.Builder().valid(false).input(null).subject(descriptor.getDisplayName());
|
||||||
|
builder = (descriptor.getDisplayName() != null) ? builder.explanation(descriptor.getDisplayName() + " is required") : builder.explanation(descriptor.getName() + " is required");
|
||||||
|
results.add(builder.build());
|
||||||
continue;
|
continue;
|
||||||
} else if (value == null) {
|
} else if (value == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue