oldPromise.cancel(true);
}
}
public void addListener(IsSimplePromiseResponseHandler<T> listener) {
if (handlers == null) {
<BUG>handlers = Collections.singletonList(listener);
} else {
handlers.add(listener);
}</BUG>
if (response != null || exception != null) {

oldPromise.cancel(true);
}
}
public void addListener(IsSimplePromiseResponseHandler<T> listener) {
if (handlers == null) {
handlers = new LinkedList<>();
}
handlers.add(listener);
if (response != null || exception != null) {
