diff options
Diffstat (limited to 'gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/topic/ChangeSetInfoFactory.java')
-rw-r--r-- | gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/topic/ChangeSetInfoFactory.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/topic/ChangeSetInfoFactory.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/topic/ChangeSetInfoFactory.java index b62dd8ff3d..a686a095e0 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/topic/ChangeSetInfoFactory.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/topic/ChangeSetInfoFactory.java @@ -54,6 +54,9 @@ public class ChangeSetInfoFactory { final List<ChangeSetElement> changeSetElements = db.changeSetElements().byChangeSet(csId).toList(); // Our data source will be the last change in the ChangeSet // + if(changeSetElements.isEmpty()){ + throw new ChangeSetInfoNotAvailableException(); + } final Change.Id changeId = changeSetElements.get(changeSetElements.size() - 1).getChangeId(); final Change change = db.changes().get(changeId); final PatchSet patchSet = db.patchSets().get(change.currentPatchSetId()); |