Fix callback group implementation to match the documentation.
The contract for a CallbackGroup is that all callbacks are invoked exactly once (either success or failure). + Failures are invoked immediately + Success wait until all callbacks are complete In certain situations, like caches, callbacks may be invoked immediately if the result is known. Depending on how the other callbacks completed, this could have caused the callback to be invoked more than once; once for success and again for the subsequently added callback success or failure. Change-Id: If4c5d99bff6dc916826572ddb6fdff914536a01d
This commit is contained in:
@@ -386,7 +386,7 @@ public abstract class PatchScreen extends Screen implements
|
||||
}
|
||||
}));
|
||||
PatchUtil.DETAIL_SVC.patchScript(patchKey, idSideA, idSideB,
|
||||
settingsPanel.getValue(), cb.addGwtjsonrpc(
|
||||
settingsPanel.getValue(), cb.addFinal(
|
||||
new ScreenLoadCallback<PatchScript>(this) {
|
||||
@Override
|
||||
protected void preDisplay(final PatchScript result) {
|
||||
|
Reference in New Issue
Block a user