You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/11/01 15:43:00 UTC
[jira] [Commented] (NIFI-12301) When implementing migrateProperties, use of PropertyConfiguration.hasProperty() may return wrong result
[ https://issues.apache.org/jira/browse/NIFI-12301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781799#comment-17781799 ]
ASF subversion and git services commented on NIFI-12301:
--------------------------------------------------------
Commit 9b33d54f53d9730a7891e913e466b7ab0148a188 in nifi's branch refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=9b33d54f53 ]
NIFI-12301 Corrected hasProperty() check when Migrating Properties
When calling migrateProperties, provide the properties that were configured in the VersionedComponent, rather than creating a new property map based on the component's new properties
This closes #7964
Signed-off-by: David Handermann <ex...@apache.org>
> When implementing migrateProperties, use of PropertyConfiguration.hasProperty() may return wrong result
> -------------------------------------------------------------------------------------------------------
>
> Key: NIFI-12301
> URL: https://issues.apache.org/jira/browse/NIFI-12301
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Critical
> Fix For: 2.0.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When making use of PropertyConfiguration.hasProperty(String) or PropertyConfiguration.hasProperty(PropertyDescriptor), the method always returns {{true}} if the property is defined in the component evaluating it - even when the property did not exist in the previous build.
> Before calling {{migrateProperties}} we apply the configuration to the Processor/Controller Service/Reporting Task. We then create the PropertyConfiguration based on that. So, if the property descriptor is defined in the new version, hasProperty will return true, even if it was not in the properties of the previous version of the component.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)