1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-07-01 07:46:45 +02: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() { public void reportFailure() {
reportFailure(null); 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. * @param failureException the exception causing this synchronization point to fail.
*/ */
public void reportFailure(E failureException) { public void reportFailure(E failureException) {
assert failureException != null;
connectionLock.lock(); connectionLock.lock();
try { try {
state = State.Failure; state = State.Failure;