Skip to content

Commit

Permalink
add SuppressWarnings(removal) against Thread.resume(),Thread.suspend(…
Browse files Browse the repository at this point in the history
…) to avoid the Compiler Warning as there is no clear substitute (#489)
  • Loading branch information
eklaDFF authored Aug 4, 2024
1 parent 8b0618d commit 50557c9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/tests/gov/nasa/jpf/test/vm/threads/SuspendResumeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public void run(){
}
}

@SuppressWarnings("removal") // Thread.suspend()
@Test
public void testBasicSuspendDeadlock(){
if (verifyDeadlock("+cg.threads.break_yield")) {
Expand All @@ -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")) {
Expand Down Expand Up @@ -106,7 +108,8 @@ public synchronized void run(){
System.out.println("t2 terminating");
}
}


@SuppressWarnings("removal") // Thread.suspend()
@Test
public void testLockholderSuspendDeadlock(){

Expand Down Expand Up @@ -144,6 +147,7 @@ public synchronized void run(){
}
}

@SuppressWarnings("removal") // Thread.suspend()
@Test
public void testWaitingSuspendNotifyDeadlock(){
if (verifyDeadlock("+cg.threads.break_yield")) {
Expand All @@ -166,7 +170,8 @@ public void testWaitingSuspendNotifyDeadlock(){
}
}
}


@SuppressWarnings("removal") // Thread.suspend(), Thread.resume()
@Test
public void testWaitingSuspendNotifyResume(){
if (verifyNoPropertyViolation("+cg.threads.break_yield")) {
Expand Down Expand Up @@ -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")) {
Expand All @@ -245,7 +251,7 @@ public void testBlockSuspendUnblockDeadlock(){
}
}


@SuppressWarnings("removal") // Thread.suspend(), Thread.resume()
@Test
public void testBlockSuspendUnblockResume(){
if (verifyNoPropertyViolation("+cg.threads.break_yield")) {
Expand Down

0 comments on commit 50557c9

Please sign in to comment.