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
1 changed files with 7 additions and 1 deletions

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;