p-kimberley commented on code in PR #8231:
URL: https://github.com/apache/nifi/pull/8231#discussion_r1451091233
##########
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/ListS3.java:
##########
@@ -499,23 +500,19 @@ private void listByTrackingTimestamps(ProcessContext
context, ProcessSession ses
writer.beginListing();
do {
- VersionListing versionListing = bucketLister.listVersions();
+ final VersionListing versionListing =
bucketLister.listVersions();
for (S3VersionSummary versionSummary :
versionListing.getVersionSummaries()) {
- long lastModified =
versionSummary.getLastModified().getTime();
- if (lastModified < currentTimestamp
- || lastModified == currentTimestamp &&
currentKeys.contains(versionSummary.getKey())
- || (maxAgeMilliseconds != null && (lastModified <
(listingTimestamp - maxAgeMilliseconds)))
- || lastModified > (listingTimestamp -
minAgeMilliseconds)) {
+ final long lastModified =
versionSummary.getLastModified().getTime();
+ if (lastModified == currentTimestamp &&
currentKeys.contains(versionSummary.getKey())
+ || !includeObjectInListing(versionSummary,
listingTimestamp)) {
Review Comment:
Good pickup, thanks. I found the variable names to be confusing, so
`currentTimestamp` is now `listingTimestamp` and vice versa.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]