mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +01:00
Deprecate SynchronizationPoint.reportFailure()
assert and document that an exception must be set when calling reportFailure(E).
This commit is contained in:
parent
dabbb40de6
commit
9a69f992c4
1 changed files with 7 additions and 1 deletions
|
@ -160,16 +160,22 @@ public class SynchronizationPoint<E extends Exception> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
* @deprecated use {@link #reportFailure(Exception)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void reportFailure() {
|
||||
reportFailure(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Report this synchronization point as failed because of the given exception.
|
||||
* Report this synchronization point as failed because of the given exception. The {@code failureException} must be set.
|
||||
*
|
||||
* @param failureException the exception causing this synchronization point to fail.
|
||||
*/
|
||||
public void reportFailure(E failureException) {
|
||||
assert failureException != null;
|
||||
connectionLock.lock();
|
||||
try {
|
||||
state = State.Failure;
|
||||
|
|
Loading…
Reference in a new issue