From 50557c95ac703c2b71ba0532605ea5977fed3929 Mon Sep 17 00:00:00 2001 From: Rahul Kumar <78310039+eklaDFF@users.noreply.github.com> Date: Sun, 4 Aug 2024 16:28:07 +0530 Subject: [PATCH] add SuppressWarnings(removal) against Thread.resume(),Thread.suspend() to avoid the Compiler Warning as there is no clear substitute (#489) --- .../jpf/test/vm/threads/SuspendResumeTest.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/tests/gov/nasa/jpf/test/vm/threads/SuspendResumeTest.java b/src/tests/gov/nasa/jpf/test/vm/threads/SuspendResumeTest.java index 01ef1f36..bcc04cf3 100644 --- a/src/tests/gov/nasa/jpf/test/vm/threads/SuspendResumeTest.java +++ b/src/tests/gov/nasa/jpf/test/vm/threads/SuspendResumeTest.java @@ -42,6 +42,7 @@ public void run(){ } } + @SuppressWarnings("removal") // Thread.suspend() @Test public void testBasicSuspendDeadlock(){ if (verifyDeadlock("+cg.threads.break_yield")) { @@ -61,7 +62,8 @@ public void testBasicSuspendDeadlock(){ //t1.resume(); } } - + + @SuppressWarnings("removal") // Thread.suspend(), Thread.resume() @Test public void testBasicSuspendResume(){ if (verifyNoPropertyViolation("+cg.threads.break_yield")) { @@ -106,7 +108,8 @@ public synchronized void run(){ System.out.println("t2 terminating"); } } - + + @SuppressWarnings("removal") // Thread.suspend() @Test public void testLockholderSuspendDeadlock(){ @@ -144,6 +147,7 @@ public synchronized void run(){ } } + @SuppressWarnings("removal") // Thread.suspend() @Test public void testWaitingSuspendNotifyDeadlock(){ if (verifyDeadlock("+cg.threads.break_yield")) { @@ -166,7 +170,8 @@ public void testWaitingSuspendNotifyDeadlock(){ } } } - + + @SuppressWarnings("removal") // Thread.suspend(), Thread.resume() @Test public void testWaitingSuspendNotifyResume(){ if (verifyNoPropertyViolation("+cg.threads.break_yield")) { @@ -220,7 +225,8 @@ public void run(){ System.out.println("t4 terminating"); } } - + + @SuppressWarnings("removal") // Thread.suspend() @Test public void testBlockSuspendUnblockDeadlock(){ if (verifyDeadlock("+cg.threads.break_yield")) { @@ -245,7 +251,7 @@ public void testBlockSuspendUnblockDeadlock(){ } } - + @SuppressWarnings("removal") // Thread.suspend(), Thread.resume() @Test public void testBlockSuspendUnblockResume(){ if (verifyNoPropertyViolation("+cg.threads.break_yield")) {