Pierre Villard created NIFI-15636:
-------------------------------------

             Summary: 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


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