Skip to content

Commit 6b80dfd

Browse files
authored
Update Task.java
1 parent 35e519b commit 6b80dfd

File tree

1 file changed

+6
-11
lines changed
  • task/src/main/java/com/acutecoder/task

1 file changed

+6
-11
lines changed

task/src/main/java/com/acutecoder/task/Task.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ public class Task<T> {
2020
private Callback onStart, onEnd;
2121
private boolean isBackground = true, isRunning = false;
2222

23-
protected Task(Runnable<T> runnable) {
23+
/**
24+
* Creates a new Task instance
25+
*
26+
* @param runnable The task
27+
*/
28+
public Task(Runnable<T> runnable) {
2429
this.runnable = runnable;
2530
}
2631

@@ -193,14 +198,4 @@ public TaskException(String msg, boolean isBackground) {
193198
super("Error while executing " + (isBackground ? "Background" : "Foreground") + " task: " + msg);
194199
}
195200
}
196-
197-
/**
198-
* For Java 1.7
199-
*/
200-
public static class Java_1_7<T> extends Task<T> {
201-
202-
public Java_1_7(Runnable<T> runnable) {
203-
super(runnable);
204-
}
205-
}
206201
}

0 commit comments

Comments
 (0)