Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
* Documentation
* Whitespace
* Messages
  • Loading branch information
grantland committed Jan 15, 2016
1 parent 9fc8ac9 commit c4ddddc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions bolts-tasks/src/main/java/bolts/ExecutorException.java
@@ -1,11 +1,12 @@
package bolts;

/**
* This is a wrapper class for emphasizing that task failed due to bad Executor, rather than the continuation block it self.
* This is a wrapper class for emphasizing that task failed due to bad {@code Executor}, rather than
* the continuation block it self.
*/
public class ExecutorException extends RuntimeException {

public ExecutorException(Exception e) {
super("An exception was thrown by a Executor", e);
}
public ExecutorException(Exception e) {
super("An exception was thrown by an Executor", e);
}
}
8 changes: 4 additions & 4 deletions bolts-tasks/src/main/java/bolts/Task.java
Expand Up @@ -48,11 +48,11 @@ public class Task<TResult> {
public static final Executor UI_THREAD_EXECUTOR = AndroidExecutors.uiThread();

/**
* Interface for handlers invoked when a failed <tt>Task</tt> is about to be
* Interface for handlers invoked when a failed {@code Task} is about to be
* finalized, but the exception has not been consumed.
*
* <p>The handler will execute in the GC thread, so if the handler needs to do
* anything time consuming or complex it is a good idea to fire off a Task
* anything time consuming or complex it is a good idea to fire off a {@code Task}
* to handle the exception.
*
* @see #getUnobservedExceptionHandler
Expand All @@ -73,7 +73,7 @@ public interface UnobservedExceptionHandler {

/**
* Returns the handler invoked when a task has an unobserved
* exception or null.
* exception or {@code null}.
*/
public static UnobservedExceptionHandler getUnobservedExceptionHandler() {
return unobservedExceptionHandler;
Expand Down Expand Up @@ -186,7 +186,7 @@ public void waitForCompletion() throws InterruptedException {

/**
* Blocks until the task is complete or times out.
* @return {@code true} if the task completed (has a result, an error, or was cancelled.
* @return {@code true} if the task completed (has a result, an error, or was cancelled).
* {@code false} otherwise.
*/
public boolean waitForCompletion(long duration, TimeUnit timeUnit) throws InterruptedException {
Expand Down

0 comments on commit c4ddddc

Please sign in to comment.