[ 
https://issues.apache.org/jira/browse/NIFI-15636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard updated NIFI-15636:
----------------------------------
    Status: Patch Available  (was: Open)

> StandardFlowComparator NullPointerException when property descriptors are 
> null in compareProperties
> ---------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-15636
>                 URL: https://issues.apache.org/jira/browse/NIFI-15636
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Major
>
> StandardFlowComparator.compareProperties() throws a NullPointerException when 
> getPropertyDescriptors() returns null for a component being compared.
>  
> {code:java}
> Exception in thread "main" java.lang.NullPointerException: Cannot invoke 
> "java.util.Map.get(Object)" because "descriptorsB" is null     at 
> o.a.n.registry.flow.diff.StandardFlowComparator.lambda$compareProperties$2(StandardFlowComparator.java:391)
>      at java.base/java.util.LinkedHashMap.forEach(Unknown Source)     at 
> o.a.n.registry.flow.diff.StandardFlowComparator.compareProperties(StandardFlowComparator.java:389){code}
>  
> The fix wraps all compareProperties call sites with the existing 
> nullToEmpty() method to be consistent with VersionedFlowRegistryClient.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to