aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1922/github_302/Task.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs1922/github_302/Task.java')
-rw-r--r--tests/bugs1922/github_302/Task.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bugs1922/github_302/Task.java b/tests/bugs1922/github_302/Task.java
new file mode 100644
index 000000000..0d1ea6402
--- /dev/null
+++ b/tests/bugs1922/github_302/Task.java
@@ -0,0 +1,20 @@
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+public class Task {
+ final ExecutorService taskManager;
+
+ public Task(final ExecutorService executorService) {
+ taskManager = executorService;
+ }
+
+ public void doSomething() throws ExecutionException, InterruptedException {
+ Future<?> future = taskManager.submit(Task::toIntercept);
+ future.get();
+ }
+
+ public static void toIntercept() {
+ //System.out.println("Executing task")
+ }
+}