You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/10/17 20:36:05 UTC
[jira] [Commented] (NIFI-1044) fix inconsistency in how
PropertyDescriptors that use StandardValidators.BOOLEAN_VALIDATOR are
built
[ https://issues.apache.org/jira/browse/NIFI-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14962032#comment-14962032 ]
ASF GitHub Bot commented on NIFI-1044:
--------------------------------------
Github user trkurc commented on the pull request:
https://github.com/apache/nifi/pull/87#issuecomment-148940719
It looks good, with the exception of a couple issues. First off, adding the allowableValues on the HAS_HEADER property descriptor actually could break flows already using this processor - e.g. If I have the value "False", which validated previously, it breaks with this change. I added a ticket (NIFI-1044) which sort of addresses this issue as a whole, if there is a compatibility break, we may want to hold that change.
Secondly, there should probably be some sanity checking on the delimiter value now. It is pretty cool that I can use \t, or even \u0009, and I used \u0555 which totally worked. However, I can also use \n, which probably shouldn't be allowed (I'm not even sure what would be expected)
> fix inconsistency in how PropertyDescriptors that use StandardValidators.BOOLEAN_VALIDATOR are built
> -----------------------------------------------------------------------------------------------------
>
> Key: NIFI-1044
> URL: https://issues.apache.org/jira/browse/NIFI-1044
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: 0.3.0
> Reporter: Tony Kurc
> Priority: Minor
> Labels: inconsistency
>
> There is some inconsistency in how Property descriptors are built when the validator is the BOOLEAN validator, notably with defaultValue and allowableValues
> Sometimes this (Upper Case First Character)
> {code:java}
> .defaultValue("True")
> .allowableValues("True", "False")
> .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
> {code}
> Sometimes this (all lower case)
> {code:java}
> .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
> .allowableValues("true", "false")
> .defaultValue("true")
> {code}
> And sometimes no allowableValues are used.
> Discovered when reviewing pull request for NIFI-944 and noticed the author of a pull request attempted to add allowableValues for consistency.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)