Use @NonNull annotation of getRepository method

Better describes the contract between getRepository and its callers,
and reduces findbugs output by declaring that contract.