diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-04-10 11:03:13 +0200 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-04-10 11:23:00 +0200 |
commit | 856db5d97f329041751418b2cc43d7574e26144d (patch) | |
tree | 10893c2586a7b98fc5d48473a23499c32ba53be8 /tests/bugs1922/github_302/Task.java | |
parent | e54ae565842527ac8cd55807649a32d17dec627e (diff) | |
download | aspectj-856db5d97f329041751418b2cc43d7574e26144d.tar.gz aspectj-856db5d97f329041751418b2cc43d7574e26144d.zip |
Add IT reproducing JoinPointImpl thread-locals memory leak
Relates to #302.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/bugs1922/github_302/Task.java')
-rw-r--r-- | tests/bugs1922/github_302/Task.java | 20 |
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") + } +} |