[ 
https://issues.apache.org/jira/browse/NIFI-15636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18060535#comment-18060535
 ] 

ASF subversion and git services commented on NIFI-15636:
--------------------------------------------------------

Commit 9ec75610fecb8573108410fedf84d27b7ca029c2 in nifi's branch 
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=9ec75610fe ]

NIFI-15636 Fixed NPE in StandardFlowComparator when property descriptors are 
null in compareProperties (#10927)

Signed-off-by: David Handermann <[email protected]>

> 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
>          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)

Reply via email to