1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

Deprecate SynchronizationPoint.reportFailure()

assert and document that an exception must be set when calling
reportFailure(E).
This commit is contained in:
Florian Schmaus 2015-04-07 08:52:48 +02:00
parent dabbb40de6
commit 9a69f992c4

View file

@ -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;