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));