Merge "ChangeInserter: fix comparison of Change.Id to Change.Key" into stable-2.9

This commit is contained in:
Edwin Kempin
2014-06-30 09:38:15 +00:00
committed by Gerrit Code Review

View File

@@ -214,8 +214,12 @@ public class ChangeInserter {
}
private boolean messageIsForChange() {
return changeMessage != null
&& changeMessage.getKey().getParentKey().equals(change.getKey());
if (changeMessage == null) {
return false;
}
Change.Id id = change.getId();
Change.Id msgId = changeMessage.getKey().getParentKey();
return msgId.equals(id);
}
private void insertMessage(ReviewDb db) throws OrmException {