Fix notes NPE for has:draft search predicate.

Use notes() instead of accessing the notes field directly since it can
be null.  Calling notes() ensures that it is not null.

Change-Id: Ie7e49cdf38b929e637f650b2cf1f6a2db9b68890
This commit is contained in:
Martin Fick
2016-11-13 08:35:00 -07:00
committed by David Pursehouse
parent 01583ca0ee
commit 62d46660cf

View File

@@ -1056,7 +1056,7 @@ public class ChangeData {
return Collections.emptySet();
}
draftsByUser = new HashSet<>();
for (PatchLineComment sc : plcUtil.draftByChange(db, notes)) {
for (PatchLineComment sc : plcUtil.draftByChange(db, notes())) {
draftsByUser.add(sc.getAuthor());
}
}