Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -262,21 +262,27 @@ private List<ChangeLog> fetchUpdatedChangeLogs(TrackedResourceSet updatedTrs) {
*/
private boolean fetchRemoteChangeLogs(ChangeLog currentChangeLog, List<ChangeLog> changeLogs) {
boolean foundChangeEvent = false;
URI previousChangeLog;
do {
if (currentChangeLog != null) {
changeLogs.add(currentChangeLog);
if (lastProcessedChangeEventUri == null || RDF.nil.getURI().equals(lastProcessedChangeEventUri.toString())) {
foundChangeEvent = true;
}

while (currentChangeLog != null) {
changeLogs.add(currentChangeLog);
if (lastProcessedChangeEventUri != null && !RDF.nil.getURI().equals(lastProcessedChangeEventUri.toString())) {
if (ProviderUtil.changeLogContainsEvent(lastProcessedChangeEventUri,
currentChangeLog)) {
foundChangeEvent = true;
break;
}
previousChangeLog = currentChangeLog.getPrevious();
currentChangeLog = trsClient.fetchRemoteChangeLog(previousChangeLog);
} else {
}

URI previousChangeLog = currentChangeLog.getPrevious();
if (previousChangeLog == null || RDF.nil.getURI().equals(previousChangeLog.toString())) {
break;
}
} while (!RDF.nil.getURI().equals(previousChangeLog.toString()));

currentChangeLog = trsClient.fetchRemoteChangeLog(previousChangeLog);
}
return foundChangeEvent;
}
Comment on lines 270 to 295

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix addresses an important scenario where a server starts with an empty base (cutoff event is null or RDF.nil) and adds change events without rebasing. However, there doesn't appear to be test coverage for this specific scenario. Consider adding a test case that verifies the behavior when lastProcessedChangeEventUri is set to RDF.nil (from an empty base) to ensure this fix works correctly and to prevent regression.

Copilot uses AI. Check for mistakes.

Expand Down
Loading