44 * This source code is licensed under the MIT license found in the
55 * LICENSE file in the root directory of this source tree.
66 */
7- package bolts ;
7+ package com . parse . boltsinternal ;
88
99import java .util .ArrayList ;
1010import java .util .Collection ;
@@ -111,7 +111,7 @@ private Task(boolean cancelled) {
111111 }
112112
113113 /**
114- * @deprecated Please use {@link bolts. TaskCompletionSource()} instead.
114+ * @deprecated Please use {@link com.parse.boltsinternal. TaskCompletionSource ()} instead.
115115 */
116116 public static <TResult > Task <TResult >.TaskCompletionSource create () {
117117 Task <TResult > task = new Task <>();
@@ -208,7 +208,7 @@ public static <TResult> Task<TResult> forResult(TResult value) {
208208 if (value instanceof Boolean ) {
209209 return (Task <TResult >) ((Boolean ) value ? TASK_TRUE : TASK_FALSE );
210210 }
211- bolts . TaskCompletionSource <TResult > tcs = new bolts .TaskCompletionSource <>();
211+ com . parse . boltsinternal . TaskCompletionSource <TResult > tcs = new com . parse . boltsinternal .TaskCompletionSource <>();
212212 tcs .setResult (value );
213213 return tcs .getTask ();
214214 }
@@ -217,7 +217,7 @@ public static <TResult> Task<TResult> forResult(TResult value) {
217217 * Creates a faulted task with the given error.
218218 */
219219 public static <TResult > Task <TResult > forError (Exception error ) {
220- bolts . TaskCompletionSource <TResult > tcs = new bolts .TaskCompletionSource <>();
220+ com . parse . boltsinternal . TaskCompletionSource <TResult > tcs = new com . parse . boltsinternal .TaskCompletionSource <>();
221221 tcs .setError (error );
222222 return tcs .getTask ();
223223 }
@@ -262,7 +262,7 @@ static Task<Void> delay(long delay, ScheduledExecutorService executor, final Can
262262 return Task .forResult (null );
263263 }
264264
265- final bolts . TaskCompletionSource <Void > tcs = new bolts .TaskCompletionSource <>();
265+ final com . parse . boltsinternal . TaskCompletionSource <Void > tcs = new com . parse . boltsinternal .TaskCompletionSource <>();
266266 final ScheduledFuture <?> scheduled = executor .schedule (new Runnable () {
267267 @ Override
268268 public void run () {
@@ -343,7 +343,7 @@ public static <TResult> Task<TResult> call(final Callable<TResult> callable, Exe
343343 */
344344 public static <TResult > Task <TResult > call (final Callable <TResult > callable , Executor executor ,
345345 final CancellationToken ct ) {
346- final bolts . TaskCompletionSource <TResult > tcs = new bolts .TaskCompletionSource <>();
346+ final com . parse . boltsinternal . TaskCompletionSource <TResult > tcs = new com . parse . boltsinternal .TaskCompletionSource <>();
347347 try {
348348 executor .execute (new Runnable () {
349349 @ Override
@@ -402,7 +402,7 @@ public static <TResult> Task<Task<TResult>> whenAnyResult(Collection<? extends T
402402 return Task .forResult (null );
403403 }
404404
405- final bolts . TaskCompletionSource <Task <TResult >> firstCompleted = new bolts .TaskCompletionSource <>();
405+ final com . parse . boltsinternal . TaskCompletionSource <Task <TResult >> firstCompleted = new com . parse . boltsinternal .TaskCompletionSource <>();
406406 final AtomicBoolean isAnyTaskComplete = new AtomicBoolean (false );
407407
408408 for (Task <TResult > task : tasks ) {
@@ -438,7 +438,7 @@ public static Task<Task<?>> whenAny(Collection<? extends Task<?>> tasks) {
438438 return Task .forResult (null );
439439 }
440440
441- final bolts . TaskCompletionSource <Task <?>> firstCompleted = new bolts .TaskCompletionSource <>();
441+ final com . parse . boltsinternal . TaskCompletionSource <Task <?>> firstCompleted = new com . parse . boltsinternal .TaskCompletionSource <>();
442442 final AtomicBoolean isAnyTaskComplete = new AtomicBoolean (false );
443443
444444 for (Task <?> task : tasks ) {
@@ -524,7 +524,7 @@ public static Task<Void> whenAll(Collection<? extends Task<?>> tasks) {
524524 return Task .forResult (null );
525525 }
526526
527- final bolts . TaskCompletionSource <Void > allFinished = new bolts .TaskCompletionSource <>();
527+ final com . parse . boltsinternal . TaskCompletionSource <Void > allFinished = new com . parse . boltsinternal .TaskCompletionSource <>();
528528 final ArrayList <Exception > causes = new ArrayList <>();
529529 final Object errorLock = new Object ();
530530 final AtomicInteger count = new AtomicInteger (tasks .size ());
@@ -642,7 +642,7 @@ public <TContinuationResult> Task<TContinuationResult> continueWith(
642642 final Continuation <TResult , TContinuationResult > continuation , final Executor executor ,
643643 final CancellationToken ct ) {
644644 boolean completed ;
645- final bolts . TaskCompletionSource <TContinuationResult > tcs = new bolts .TaskCompletionSource <>();
645+ final com . parse . boltsinternal . TaskCompletionSource <TContinuationResult > tcs = new com . parse . boltsinternal .TaskCompletionSource <>();
646646 synchronized (lock ) {
647647 completed = this .isCompleted ();
648648 if (!completed ) {
@@ -696,7 +696,7 @@ public <TContinuationResult> Task<TContinuationResult> continueWithTask(
696696 final Continuation <TResult , Task <TContinuationResult >> continuation , final Executor executor ,
697697 final CancellationToken ct ) {
698698 boolean completed ;
699- final bolts . TaskCompletionSource <TContinuationResult > tcs = new bolts .TaskCompletionSource <>();
699+ final com . parse . boltsinternal . TaskCompletionSource <TContinuationResult > tcs = new com . parse . boltsinternal .TaskCompletionSource <>();
700700 synchronized (lock ) {
701701 completed = this .isCompleted ();
702702 if (!completed ) {
@@ -850,7 +850,7 @@ public <TContinuationResult> Task<TContinuationResult> onSuccessTask(
850850 * scheduled on a different thread).
851851 */
852852 private static <TContinuationResult , TResult > void completeImmediately (
853- final bolts .TaskCompletionSource <TContinuationResult > tcs ,
853+ final com . parse . boltsinternal .TaskCompletionSource <TContinuationResult > tcs ,
854854 final Continuation <TResult , TContinuationResult > continuation , final Task <TResult > task ,
855855 Executor executor , final CancellationToken ct ) {
856856 try {
@@ -890,7 +890,7 @@ public void run() {
890890 * scheduled on a different thread).
891891 */
892892 private static <TContinuationResult , TResult > void completeAfterTask (
893- final bolts .TaskCompletionSource <TContinuationResult > tcs ,
893+ final com . parse . boltsinternal .TaskCompletionSource <TContinuationResult > tcs ,
894894 final Continuation <TResult , Task <TContinuationResult >> continuation ,
895895 final Task <TResult > task , final Executor executor ,
896896 final CancellationToken ct ) {
@@ -1006,9 +1006,9 @@ private void runContinuations() {
10061006 }
10071007
10081008 /**
1009- * @deprecated Please use {@link bolts .TaskCompletionSource} instead.
1009+ * @deprecated Please use {@link com.parse.boltsinternal .TaskCompletionSource} instead.
10101010 */
1011- public class TaskCompletionSource extends bolts .TaskCompletionSource <TResult > {
1011+ public class TaskCompletionSource extends com . parse . boltsinternal .TaskCompletionSource <TResult > {
10121012
10131013 /* package */ TaskCompletionSource () {
10141014 }
0 commit comments