Fix browser NPE when ChangeCache is incomplete
The ChangeCache is buggy and does not always populate its contents. Unfortunately it is also designed to be unable to load missing contents on demand, causing consumers to NPE. ConfigInfoCache is a better design for this sort of lazy loading and reuse of data. ChangeCache can be missing information if: 1) opens side-by-side view in a new tab; 2) user presses 'r' to open publish comment screen Instead of using the unreliable ChangeCache, stub out a ChangeDetail to feed to the info block on the publish comments screen. Change-Id: Id542528d93af1cab49b001ca5e90addfc5d05b78
This commit is contained in:
@@ -322,7 +322,7 @@ public class ChangeScreen extends Screen
|
||||
|
||||
dependencies.setAccountInfoCache(detail.getAccounts());
|
||||
|
||||
descriptionBlock.display(detail.getChange(),
|
||||
descriptionBlock.display(detail,
|
||||
detail.isStarred(),
|
||||
detail.canEditCommitMessage(),
|
||||
detail.getCurrentPatchSetDetail().getInfo(),
|
||||
|
Reference in New Issue
Block a user