Fix early return after populating currentFiles from diffSummary Without an early return, `currentFilePaths()` would fall through after populating `currentFiles` from the already-loaded diff summary, unnecessarily fetching the change and current patch set and then re-computing the file list via `DiffOperations`. The diff summary path was clearly intended as a fast exit, but the missing `return` meant it was silently ignored every time. Release-Notes: skip Change-Id: I1e7feeb4c62476d606173677cc826634d3c11dee
diff --git a/java/com/google/gerrit/server/query/change/ChangeData.java b/java/com/google/gerrit/server/query/change/ChangeData.java index 49b1165..6ac66bf 100644 --- a/java/com/google/gerrit/server/query/change/ChangeData.java +++ b/java/com/google/gerrit/server/query/change/ChangeData.java
@@ -622,6 +622,7 @@ // If the diff summary was already loaded get the path from it. if (diffSummary != null) { currentFiles = diffSummary.get().getPaths(); + return currentFiles; } Change c = change();