From d804c1044616042ffaa125809a2fade84fa3a0d6 Mon Sep 17 00:00:00 2001 From: riversun Date: Thu, 2 May 2019 18:43:39 +0900 Subject: [PATCH] Exclude varargs from onFinish --- src/main/java/org/riversun/promise/Promise.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/riversun/promise/Promise.java b/src/main/java/org/riversun/promise/Promise.java index f85a419..fad91db 100644 --- a/src/main/java/org/riversun/promise/Promise.java +++ b/src/main/java/org/riversun/promise/Promise.java @@ -248,15 +248,9 @@ public void reject() { } - private void onFinish(Object... result) { + private void onFinish(Object result) { - final Object crrResult; - - if (result != null && result.length > 0) { - crrResult = result[0]; - } else { - crrResult = null; - } + final Object crrResult = result; final Promise nextPromise = mParentPromise.mNextPromise;