Skip to content

Commit

Permalink
Exclude varargs from onFinish
Browse files Browse the repository at this point in the history
  • Loading branch information
riversun committed May 2, 2019
1 parent ddec91e commit d804c10
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/java/org/riversun/promise/Promise.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d804c10

Please sign in to comment.