Restore add(Promise) and addAll(Promise...) methods to PromiseCombiner.
Motivation: A testing goof in 7c630fe introduced a binary incompatibility when the old Promise-specific `add` and `addAll` methods in PromiseCombiner were generalized to accept `Futures`. Modification: - Restore (but mark as `@Deprecated`) old PromiseCombiner methods. - Fixed a couple minor documentation typos because sure why not. Result: `PromiseCombiner` is binary-compatible with previous versions of Netty.
This commit is contained in:
parent
7a39afd031
commit
94cb389c04
@ -48,9 +48,22 @@ public final class PromiseCombiner {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a new promise to be combined. New promises may be added until an aggregate promise is added via the
|
||||
* {@link PromiseCombiner#finish(Promise)} method.
|
||||
*
|
||||
* @param promise the promise to add to this promise combiner
|
||||
*
|
||||
* @deprecated Replaced by {@link PromiseCombiner#add(Future)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public void add(Promise promise) {
|
||||
add((Future) promise);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new future to be combined. New futures may be added until an aggregate promise is added via the
|
||||
* {@link PromiseCombiner#finish(Promise)} method has been called.
|
||||
* {@link PromiseCombiner#finish(Promise)} method.
|
||||
*
|
||||
* @param future the future to add to this promise combiner
|
||||
*/
|
||||
@ -61,9 +74,22 @@ public final class PromiseCombiner {
|
||||
future.addListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds new promises to be combined. New promises may be added until an aggregate promise is added via the
|
||||
* {@link PromiseCombiner#finish(Promise)} method.
|
||||
*
|
||||
* @param promises the promises to add to this promise combiner
|
||||
*
|
||||
* @deprecated Replaced by {@link PromiseCombiner#addAll(Future[])}
|
||||
*/
|
||||
@Deprecated
|
||||
public void addAll(Promise... promises) {
|
||||
addAll((Future[]) promises);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds new futures to be combined. New futures may be added until an aggregate promise is added via the
|
||||
* {@link PromiseCombiner#finish(Promise)} method has been called.
|
||||
* {@link PromiseCombiner#finish(Promise)} method.
|
||||
*
|
||||
* @param futures the futures to add to this promise combiner
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user