NIFI-15523: Fix EventIterator of factory not returning items#10837
Merged
exceptionfactory merged 3 commits intoapache:mainfrom Feb 1, 2026
Merged
NIFI-15523: Fix EventIterator of factory not returning items#10837exceptionfactory merged 3 commits intoapache:mainfrom
of factory not returning items#10837exceptionfactory merged 3 commits intoapache:mainfrom
Conversation
8841d27 to
7decfc1
Compare
An EventIterator created using the `of` factory would return Optional.empty() when there are actually items in the internal iterator. Flipping the ternary result expressions fixes this issue. Added some basic tests to exercise the two factories and the default filter implementation.
7decfc1 to
17dd70f
Compare
exceptionfactory
requested changes
Jan 30, 2026
Contributor
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for finding and addressing this issue @ohnoitsyou.
The EventIterator changes look good. I noted a couple minor syntax issues in the test class, then this should be ready to go.
...ce-repository/src/test/java/org/apache/nifi/provenance/store/iterator/EventIteratorTest.java
Outdated
Show resolved
Hide resolved
...ce-repository/src/test/java/org/apache/nifi/provenance/store/iterator/EventIteratorTest.java
Outdated
Show resolved
Hide resolved
exceptionfactory
approved these changes
Feb 1, 2026
Contributor
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for making the adjustments @ohnoitsyou! +1 merging
mark-bathori
pushed a commit
to mark-bathori/nifi
that referenced
this pull request
Feb 5, 2026
…apache#10837) - EventIterator created using the `of` factory would return Optional.empty() when there are actually items in the internal iterator - Flipping the ternary result expressions fixed this issue Signed-off-by: David Handermann <exceptionfactory@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An EventIterator created using the
offactory would return Optional.empty() when there are actually items in the internal iterator.Flipping the ternary result expressions fixes this issue.
Added some basic tests to exercise the two factories and the default filter implementation.
Summary
NIFI-15523
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation