From 018473b352ef5216e8581fa843b1a3a958c51d9b Mon Sep 17 00:00:00 2001 From: Mark Latimer Date: Sat, 2 May 2015 12:18:51 +0100 Subject: [PATCH] NIFI-572 possible null dereference in PersistentProvenanceRepository.submitQuery Signed-off-by: Mark Payne --- .../apache/nifi/provenance/PersistentProvenanceRepository.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java index 27f2cbbbc7..5da5d6fe42 100644 --- a/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java +++ b/nifi/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java @@ -1438,9 +1438,10 @@ public class PersistentProvenanceRepository implements ProvenanceEventRepository trimmed = latestList; } - final Long maxEventId = getMaxEventId(); + Long maxEventId = getMaxEventId(); if (maxEventId == null) { result.getResult().update(Collections.emptyList(), 0L); + maxEventId = 0L; } Long minIndexedId = indexConfig.getMinIdIndexed(); if (minIndexedId == null) {