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

Koji Kawamura commented on NIFI-5843:
-------------------------------------

[~alex_savitsky] Thanks for your contribution! I've added 'contributor' role to 
your account. You can assign yourself to NiFi JIRA tickets. Looking forward 
seeing more contributions, thanks!

> Unclear validation message for ScriptingComponentHelper
> -------------------------------------------------------
>
>                 Key: NIFI-5843
>                 URL: https://issues.apache.org/jira/browse/NIFI-5843
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Alex Savitsky
>            Assignee: Alex Savitsky
>            Priority: Trivial
>             Fix For: 1.9.0
>
>
> ScriptingComponentHelper.customValidate (from nifi-scripting-processors) 
> creates an unclear validation message
> {quote}'' is invalid because Exactly one of Script File or Script Body must 
> be set
> {quote}
> as it doesn't specify the validation subject. Since there are technically two 
> invalid subjects in this case (Script File and Script Body), I suggest adding 
> two validation messages, one for each subject.
> Current code:
> {code:java}
> results.add(new ValidationResult.Builder().valid(false).explanation(
>         "Exactly one of Script File or Script Body must be set").build());
> {code}
> Proposed fix:
> {code:java}
> results.add(new ValidationResult.Builder().subject("Script 
> Body").valid(false).explanation(
>         "exactly one of Script File or Script Body must be set").build());
> results.add(new ValidationResult.Builder().subject("Script 
> File").valid(false).explanation(
>         "exactly one of Script File or Script Body must be set").build());
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to