From 9a69f992c42fa96fd82b79d5f45d4f9e472c4a32 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 7 Apr 2015 08:52:48 +0200 Subject: [PATCH] Deprecate SynchronizationPoint.reportFailure() assert and document that an exception must be set when calling reportFailure(E). --- .../java/org/jivesoftware/smack/SynchronizationPoint.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java b/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java index c52242350..fa87848a0 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java @@ -160,16 +160,22 @@ public class SynchronizationPoint { } } + /** + * 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;