Adjust to changes in Gerrit core

Change-Id: Ibd0f9138c157520f7f45a9e6d9814a11bd95cb03
diff --git a/java/com/google/gerrit/plugins/checks/api/ChecksFactory.java b/java/com/google/gerrit/plugins/checks/api/ChecksFactory.java
index 2aeaf8c..01cd6e6 100644
--- a/java/com/google/gerrit/plugins/checks/api/ChecksFactory.java
+++ b/java/com/google/gerrit/plugins/checks/api/ChecksFactory.java
@@ -67,7 +67,7 @@
 
   private ChangeResource getChangeResource(Change.Id changeId) throws RestApiException {
     try {
-      ChangeNotes notes = changeNotesFactory.createChecked(changeId);
+      ChangeNotes notes = changeNotesFactory.createCheckedUsingIndexLookup(changeId);
       return changeResourceFactory.create(notes, user.get());
     } catch (NoSuchChangeException e) {
       throw new ResourceNotFoundException(String.format("Change %d not found", changeId.get()), e);