Fix NPE in ChangeJson
The `draft` member is a Boolean but is set to either true or null. This causes NPE when checking `out.draft`. Change the condition to `out.draft != null && out.draft`. Change-Id: I18268c2e2f40dd07f9660788db51123573eb3e01
This commit is contained in:
committed by
Shawn Pearce
parent
cff6c16377
commit
586c380847
@@ -822,7 +822,7 @@ public class ChangeJson {
|
||||
}
|
||||
}
|
||||
|
||||
if ((out.isCurrent || out.draft)
|
||||
if ((out.isCurrent || (out.draft != null && out.draft))
|
||||
&& has(CURRENT_ACTIONS)
|
||||
&& userProvider.get().isIdentifiedUser()) {
|
||||
out.actions = Maps.newTreeMap();
|
||||
|
||||
Reference in New Issue
Block a user