[
https://issues.apache.org/jira/browse/NIFI-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14597714#comment-14597714
]
Mark Payne commented on NIFI-716:
---------------------------------
Dan,
I know that others have had this issue, as well. I wouldn't be opposed to
marking the processor as invalid, but I definitely don't think we should avoid
showing the Processor at all. If we did that, I think it would make things MUCH
more confusing when the processor didn't show up. Marking as invalid at least
provides the ability to display a nice explanation about what is wrong.
We should also make sure that the mock framework fails the unit test if we do
TestRunners.newTestRunner(new ProcessorWithDuplicateProperty());
That way, we should catch the issue immediately and provide a nice explanation
of what happened. Along the same lines, we should make sure in the mock
framework that no two properties have the exact same description, either, as I
could see someone copying & pasting and changing the name but not the
description (though i wouldn't make the processor invalid in this case, in the
actual flow - only in the mock framework).
> Framework allows you to define two properties with the same name
> ----------------------------------------------------------------
>
> Key: NIFI-716
> URL: https://issues.apache.org/jira/browse/NIFI-716
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.1.0
> Reporter: Dan Bress
> Priority: Minor
> Labels: beginner, newbie
>
> If you are lazy and copy and paste a PropertyDescriptor and forget to change
> the value assigned to name(), the framework(test or regular) does not detect
> this and proceeds happily.
> It would be great if this situation was detected as soon as possible, and
> either mark the processor as invalid, or fail to consider it as a possible
> processor.
> Example
> {code}
> public static final PropertyDescriptor MIN_SIZE = new
> PropertyDescriptor.Builder()
> .name("Minimum Group Size")
> .description("The minimum size of for the bundle")
> .required(true)
> .defaultValue("0 B")
> .addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
> .build();
> public static final PropertyDescriptor MAX_SIZE = new
> PropertyDescriptor.Builder()
> .name("Minimum Group Size")
> .description("The maximum size for the bundle. If not specified, there is no
> maximum.")
> .required(false)
> .addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
> .build();
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)