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

Oleg Zhurakousky commented on NIFI-2006:
----------------------------------------

The issue was originally reported by a community member 
([~ch...@mcdermott.net]) on the dev list yesterday with me suggesting to raise 
a JIRA which he did as NIFI-2015 albeit a bit late. So I am addressing it now 
and will mark NIFI-2015 as duplicate.

> Null attribute values causing NPEs in provenance repo
> -----------------------------------------------------
>
>                 Key: NIFI-2006
>                 URL: https://issues.apache.org/jira/browse/NIFI-2006
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Brandon DeVries
>            Priority: Critical
>             Fix For: 1.0.0, 0.7.0
>
>
> A null attribute value (as you would see for a removed attribute) causes the 
> provenance repo to thrown an NPE here:
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java#L1789
> (as "entry.getValue()" is null...)
> suggested fix is to change:
> {code}
> if (entry.getValue().length() > maxAttributeChars) {
> {code}
> to:
> {code}
> if (entry.getValue() != null && entry.getValue().length() > 
> maxAttributeChars) {
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to