PatchListCacheImpl: explicitly check for null revision
Change-Id: Ib88d104ebd288e16ee2499ca93cecd4a8b9e2b2a
(cherry picked from commit 8909bc4c2c
)
This commit is contained in:

committed by
David Pursehouse

parent
c9b686056e
commit
b1d685db43
@@ -90,6 +90,10 @@ public class PatchListCacheImpl implements PatchListCache {
|
|||||||
throws PatchListNotAvailableException {
|
throws PatchListNotAvailableException {
|
||||||
final Project.NameKey projectKey = change.getProject();
|
final Project.NameKey projectKey = change.getProject();
|
||||||
final ObjectId a = null;
|
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 ObjectId b = ObjectId.fromString(patchSet.getRevision().get());
|
||||||
final Whitespace ws = Whitespace.IGNORE_NONE;
|
final Whitespace ws = Whitespace.IGNORE_NONE;
|
||||||
return get(new PatchListKey(projectKey, a, b, ws));
|
return get(new PatchListKey(projectKey, a, b, ws));
|
||||||
|
Reference in New Issue
Block a user