[
https://issues.apache.org/jira/browse/NIFI-15636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Handermann updated NIFI-15636:
------------------------------------
Fix Version/s: 2.9.0
Resolution: Fixed
Status: Resolved (was: Patch Available)
> 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
> Fix For: 2.9.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)