Merge "PatchListCacheImpl: explicitly check for null revision" into stable-2.8

This commit is contained in:
Edwin Kempin
2013-10-31 07:23:57 +00:00
committed by Gerrit Code Review

View File

@@ -90,6 +90,10 @@ public class PatchListCacheImpl implements PatchListCache {
throws PatchListNotAvailableException {
final Project.NameKey projectKey = change.getProject();
final ObjectId a = null;
if (patchSet.getRevision() == null) {
throw new PatchListNotAvailableException(
"revision is null for " + patchSet.getId());
}
final ObjectId b = ObjectId.fromString(patchSet.getRevision().get());
final Whitespace ws = Whitespace.IGNORE_NONE;
return get(new PatchListKey(projectKey, a, b, ws));