From ef2c50577dd07a7850c06d5d0666152590ac5fd7 Mon Sep 17 00:00:00 2001 From: Andre F de Miranda Date: Sun, 11 Sep 2016 21:45:02 +1000 Subject: [PATCH] NIFI-2684 - Change AbstractConfigurableComponent to use displayName when available --- .../apache/nifi/components/AbstractConfigurableComponent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 1d4e0c200e..4c9379767c 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 @@ -91,7 +91,9 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo value = descriptor.getDefaultValue(); } 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; } else if (value == null) { continue;