[
https://issues.apache.org/jira/browse/NIFI-2006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15329677#comment-15329677
]
ASF GitHub Bot commented on NIFI-2006:
--------------------------------------
GitHub user olegz opened a pull request:
https://github.com/apache/nifi/pull/528
NIFI-2006 fixed NPE in PersistentProvenanceRepository
Fixed NPE in PersistentProvenanceRepository caused by attribute value being
null
added test
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/olegz/nifi NIFI-2006
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/528.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #528
----
commit ae20d6831af0db886e2e9bce7249b04729152594
Author: Oleg Zhurakousky <[email protected]>
Date: 2016-06-14T15:35:25Z
NIFI-2006 fixed NPE in PersistentProvenanceRepository
Fixed NPE in PersistentProvenanceRepository caused by attribute value being
null
added test
----
> 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
> Assignee: Oleg Zhurakousky
> 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)