commit | e50300670040de80c36ec7c4f8d319a8047a2735 | [log] [tgz] |
---|---|---|
author | Patrick Hiesel <hiesel@google.com> | Wed Mar 04 13:20:39 2020 +0100 |
committer | Patrick Hiesel <hiesel@google.com> | Wed Mar 04 13:20:59 2020 +0100 |
tree | 69c6750d35efcde2856f6fc282ed08c54b1197c8 | |
parent | 570dacacc64f7c01e0bc0f1301aa1d5a218cfc1b [diff] |
Adapt to ProjectCache#get interface change Change-Id: I73717b09c4f482bf6d84a11be3450d16b5bee0b1
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectsCollection.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectsCollection.java index a31f99c..5e1d54d 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectsCollection.java +++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectsCollection.java
@@ -53,7 +53,7 @@ private ProjectWebhooksResource parse(String id) throws ResourceNotFoundException { Project.NameKey n = Project.nameKey(id); - if (projectCache.get(n) != null) { + if (projectCache.get(n).isPresent()) { return new ProjectWebhooksResource(Project.nameKey(id)); } throw new ResourceNotFoundException(String.format("Project %s does not exist", id));