You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by trixpan <gi...@git.apache.org> on 2016/09/11 11:47:22 UTC

[GitHub] nifi pull request #1002: NIFI-2684 - Change AbstractConfigurableComponent to...

GitHub user trixpan opened a pull request:

    https://github.com/apache/nifi/pull/1002

    NIFI-2684 - Change AbstractConfigurableComponent to use displayName w\u2026

    \u2026hen available

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/trixpan/nifi NIFI-2684

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1002.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1002
    
----
commit c6a36323ec73d1eb6744132857c2e86998678013
Author: Andre F de Miranda <tr...@users.noreply.github.com>
Date:   2016-09-11T11:45:02Z

    NIFI-2684 - Change AbstractConfigurableComponent to use displayName when available

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1002: NIFI-2684 - Change AbstractConfigurableComponent to...

Posted by mattyb149 <gi...@git.apache.org>.
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)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1002: NIFI-2684 - Change AbstractConfigurableComponent to...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/1002


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #1002: NIFI-2684 - Change AbstractConfigurableComponent to use di...

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/1002
  
    Per a discussion with @trixpan, I offered to make the final change and add the commit when merging this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #1002: NIFI-2684 - Change AbstractConfigurableComponent to use di...

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on the issue:

    https://github.com/apache/nifi/pull/1002
  
    @trixpan from  DRY/readability perspective consider creating the builder ahead of the if/else.  So an alternative approach would look like this (formatting aside)
    
    `
                        ValidationResult.Builder  builder = new ValidationResult.Builder().valid(false).input(null).subject(descriptor.getDisplayName());
                      builder = (descriptor.getDisplayName() != null) ? builder.explanation(descriptor.getDisplayName() + " is required") : .explanation(descriptor.getName() + " is required");
                        results.add(builder.build());
    `


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #1002: NIFI-2684 - Change AbstractConfigurableComponent to use di...

Posted by trixpan <gi...@git.apache.org>.
Github user trixpan commented on the issue:

    https://github.com/apache/nifi/pull/1002
  
    @joewitt hopefully last commit addresses your feedback. Mind having another look?
    
    Cheers


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #1002: NIFI-2684 - Change AbstractConfigurableComponent to use di...

Posted by trixpan <gi...@git.apache.org>.
Github user trixpan commented on the issue:

    https://github.com/apache/nifi/pull/1002
  
    @joewitt this commit is quite small (intent is just aesthetics / UX) but ventures into waters I don't usually sail... Would you mind having a look?
    
    I thank you in advance


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---