[ 
https://issues.apache.org/jira/browse/NIFI-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648689#comment-15648689
 ] 

ASF GitHub Bot commented on NIFI-2684:
--------------------------------------

Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1002#discussion_r87074726
  
    --- Diff: 
nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java
 ---
    @@ -91,7 +91,9 @@ private PropertyDescriptor getPropertyDescriptor(final 
PropertyDescriptor specDe
                         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());
    --- End diff --
    
    Shouldn't the setting of subject to getDisplayName() only be done if it is 
not null (like you've done in the next line down)?


> Validation error messages should refer to propertyDescriptor using its 
> displayName
> ----------------------------------------------------------------------------------
>
>                 Key: NIFI-2684
>                 URL: https://issues.apache.org/jira/browse/NIFI-2684
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.0.0
>            Reporter: Andre
>            Assignee: Andre
>             Fix For: 1.1.0
>
>
> When certain validation violation are triggered, 
> {{AbstractConfigurableComponent}} refers to the descriptor using  
> {{descriptor.getName()}} 
> the result is that error messages end up referring to properties by sometimes 
> cryptic names (instead of the "pretty names" defined in {{.displayName}} )
> Users would be better of if we used {{displayName}} on error messages when 
> available, but to fallback to names in case displayName is null.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to