8273921: Refactor NSK/JDI tests to create thread using factory

Reviewed-by: cjplummer, sspitsyn, amenkov
This commit is contained in:
Leonid Mesnik 2021-09-21 23:36:16 +00:00
parent 161fdb4afb
commit a72c8aa6ad
205 changed files with 1367 additions and 1835 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,7 +42,7 @@ public class tc01x001a {
public final static int threadCount = 3;
private static Log log;
Thready [] thrds = new Thready [threadCount];
Thread[] thrds = new Thread[threadCount];
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
@ -76,7 +76,7 @@ public class tc01x001a {
tc01x001a() {
for (int i = 0; i < thrds.length; i++ ) {
thrds[i] = new Thready("Thread-" + (i+1));
thrds[i] = JDIThreadFactory.newThread(new Thready("Thread-" + (i+1)));
thrds[i].start();
}
}
@ -90,7 +90,7 @@ public class tc01x001a {
log.display(caller + "::bar_step"); // checkStepLine
}
static class Thready extends Thread {
static class Thready extends NamedTask {
Thready(String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ public class tc02x001a {
static Log log;
public final static int checkClassBrkpLine = 93;
Thready [] thrds = new Thready [threadCount];
Thread[] thrds = new Thread[threadCount];
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
@ -72,12 +72,12 @@ public class tc02x001a {
tc02x001a() {
for (int i = 0; i < thrds.length; i++ ) {
thrds[i] = new Thready("Thread-" + (i+1));
thrds[i] = JDIThreadFactory.newThread(new Thready("Thread-" + (i+1)));
thrds[i].start();
}
}
static class Thready extends Thread {
static class Thready extends NamedTask {
Thready(String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,7 +39,7 @@ public class tc02x002a {
public final static int checkClassBrkpLine1 = 96;
public final static int checkClassBrkpLine2 = 98;
Thready [] thrds = new Thready [threadCount];
Thread[] thrds = new Thread[threadCount];
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
@ -74,12 +74,12 @@ public class tc02x002a {
tc02x002a() {
for (int i = 0; i < thrds.length; i++ ) {
thrds[i] = new Thready("Thread-" + (i+1));
thrds[i] = JDIThreadFactory.newThread(new Thready("Thread-" + (i+1)));
thrds[i].start();
}
}
static class Thready extends Thread {
static class Thready extends NamedTask {
Thready(String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,7 +39,7 @@ public class tc02x003a {
public final static int checkClassBrkpLine1 = 96;
public final static int checkClassBrkpLine2 = 98;
Thready [] thrds = new Thready [threadCount];
Thread[] thrds = new Thread[threadCount];
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
@ -74,12 +74,12 @@ public class tc02x003a {
tc02x003a() {
for (int i = 0; i < thrds.length; i++ ) {
thrds[i] = new Thready("Thread-" + (i+1));
thrds[i] = JDIThreadFactory.newThread(new Thready("Thread-" + (i+1)));
thrds[i].start();
}
}
static class Thready extends Thread {
static class Thready extends NamedTask {
Thready(String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BScenarios.multithrd;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
@ -38,7 +37,7 @@ public class tc02x004a {
static Log log;
public final static int checkClassBrkpLine = 79;
Thready [] thrds = new Thready [threadCount];
Thread[] thrds = new Thread[threadCount];
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
@ -58,12 +57,12 @@ public class tc02x004a {
tc02x004a() {
for (int i = 0; i < thrds.length; i++ ) {
thrds[i] = new Thready("Thread-" + (i+1));
thrds[i] = JDIThreadFactory.newThread(new Thready("Thread-" + (i+1)));
thrds[i].start();
}
}
static class Thready extends Thread {
static class Thready extends NamedTask {
Thready(String name) {
super(name);
}
@ -75,6 +74,7 @@ public class tc02x004a {
}
}
class tc02x004aClass1 {
public tc02x004aClass1(String thrdName) { // checkClassBrkpLine
tc02x004a.log.display("tc02x004aClass1::constructor is called from"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ public class tc03x001a {
static Log log;
public final static int checkExBrkpLine = 90;
Thready [] thrds = new Thready [threadCount];
Thread[] thrds = new Thread[threadCount];
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
@ -74,12 +74,12 @@ public class tc03x001a {
tc03x001a() {
for (int i = 0; i < thrds.length; i++ ) {
thrds[i] = new Thready("Thread-" + (i+1));
thrds[i] = JDIThreadFactory.newThread(new Thready("Thread-" + (i+1)));
thrds[i].start();
}
}
static class Thready extends Thread {
static class Thready extends NamedTask {
Thready(String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BScenarios.multithrd;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
@ -37,8 +36,8 @@ public class tc04x001a {
public final static int threadCount = 3;
static Log log;
public final static int checkMethodBrkpLine = 74;
Thready [] thrds = new Thready [threadCount];
public final static int checkMethodBrkpLine = 73;
Thread[] thrds = new Thread[threadCount];
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
@ -65,7 +64,7 @@ public class tc04x001a {
tc04x001a() {
for (int i = 0; i < thrds.length; i++ ) {
thrds[i] = new Thready("Thread-" + (i+1));
thrds[i] = JDIThreadFactory.newThread(new Thready("Thread-" + (i+1)));
thrds[i].start();
}
}
@ -78,7 +77,7 @@ public class tc04x001a {
log.display(caller + "::bar is called");
}
static class Thready extends Thread {
static class Thready extends NamedTask {
Thready(String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -64,11 +64,11 @@ public class filters001a {
}
}
class filters001b extends Thread {
class filters001b extends NamedTask {
static Log log;
filters001b(String nameObj) {
setName(nameObj);
super(nameObj);
}
public void run() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class instancefilter001a {
//====================================================== test program
static Threadinstancefilter001a thread1 = null;
static Threadinstancefilter001a thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static instancefilter001aTestClass objTC[] = { new instancefilter001aTestClass(), new instancefilter001aTestClass(), new instancefilter001aTestClass() };
@ -99,8 +98,8 @@ public class instancefilter001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadinstancefilter001a("thread1");
thread2 = new Threadinstancefilter001a("thread2");
thread1 = JDIThreadFactory.newThread(new Threadinstancefilter001a("thread1"));
thread2 = JDIThreadFactory.newThread(new Threadinstancefilter001a("thread2"));
break;
case 1:
@ -149,31 +148,29 @@ public class instancefilter001a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadinstancefilter001a extends Thread {
static class Threadinstancefilter001a extends NamedTask {
String tName = null;
int tNumber;
public Threadinstancefilter001a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" objTC[tNumber].method(); :: threadName == " + tName + " tNumber == " + tNumber);
log1(" objTC[tNumber].method(); :: threadName == " + getName() + " tNumber == " + tNumber);
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class instancefilter002a {
//====================================================== test program
static Threadinstancefilter002a thread1 = null;
static Thread thread1 = null;
static instancefilter002aTestClass objTC[] = { new instancefilter002aTestClass(), new instancefilter002aTestClass() };
@ -98,7 +97,7 @@ public class instancefilter002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadinstancefilter002a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadinstancefilter002a("thread1"));
break;
//------------------------------------------------- standard end section
@ -137,21 +136,19 @@ public class instancefilter002a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadinstancefilter002a extends Thread {
static class Threadinstancefilter002a extends NamedTask {
String tName = null;
int tNumber;
public Threadinstancefilter002a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -160,7 +157,7 @@ public class instancefilter002a {
}
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class instancefilter003a {
//====================================================== test program
static Threadinstancefilter003a thread1 = null;
static Thread thread1 = null;
static instancefilter003aTestClass objTC[] = { new instancefilter003aTestClass(), new instancefilter003aTestClass() };
@ -98,7 +97,7 @@ public class instancefilter003a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadinstancefilter003a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadinstancefilter003a("thread1"));
break;
//------------------------------------------------- standard end section
@ -137,21 +136,19 @@ public class instancefilter003a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadinstancefilter003a extends Thread {
static class Threadinstancefilter003a extends NamedTask {
String tName = null;
int tNumber;
public Threadinstancefilter003a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -160,7 +157,7 @@ public class instancefilter003a {
}
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class instancefilter004a {
//====================================================== test program
static Threadinstancefilter004a thread1 = null;
static Threadinstancefilter004a thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static instancefilter004aTestClass objTC[] = { new instancefilter004aTestClass(), new instancefilter004aTestClass(), new instancefilter004aTestClass() };
@ -99,8 +98,8 @@ public class instancefilter004a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadinstancefilter004a("thread1");
thread2 = new Threadinstancefilter004a("thread2");
thread1 = JDIThreadFactory.newThread(new Threadinstancefilter004a("thread1"));
thread2 = JDIThreadFactory.newThread(new Threadinstancefilter004a("thread2"));
break;
case 1:
@ -149,31 +148,29 @@ public class instancefilter004a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadinstancefilter004a extends Thread {
static class Threadinstancefilter004a extends NamedTask {
String tName = null;
int tNumber;
public Threadinstancefilter004a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" objTC[tNumber].method(); :: threadName == " + tName + " tNumber == " + tNumber);
log1(" objTC[tNumber].method(); :: threadName == " + getName() + " tNumber == " + tNumber);
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class threadfilter001a {
//====================================================== test program
static Threadthreadfilter001a thread1 = null;
static Threadthreadfilter001a thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static threadfilter001aTestClass objTC = new threadfilter001aTestClass();
@ -99,8 +98,8 @@ public class threadfilter001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadthreadfilter001a("thread1");
thread2 = new Threadthreadfilter001a("thread2");
thread1 = JDIThreadFactory.newThread(new Threadthreadfilter001a("thread1"));
thread2 = JDIThreadFactory.newThread(new Threadthreadfilter001a("thread2"));
break;
case 1:
@ -149,21 +148,19 @@ public class threadfilter001a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadthreadfilter001a extends Thread {
static class Threadthreadfilter001a extends NamedTask {
String tName = null;
int tNumber;
public Threadthreadfilter001a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -172,7 +169,7 @@ public class threadfilter001a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class threadfilter002a {
//====================================================== test program
static Threadthreadfilter002a thread1 = null;
static Thread thread1 = null;
static threadfilter002aTestClass objTC = new threadfilter002aTestClass();
@ -98,7 +97,7 @@ public class threadfilter002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadthreadfilter002a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadthreadfilter002a("thread1"));
break;
//------------------------------------------------- standard end section
@ -137,21 +136,19 @@ public class threadfilter002a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadthreadfilter002a extends Thread {
static class Threadthreadfilter002a extends NamedTask {
String tName = null;
int tNumber;
public Threadthreadfilter002a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -160,7 +157,7 @@ public class threadfilter002a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class threadfilter003a {
//====================================================== test program
static Threadthreadfilter003a thread1 = null;
static Thread thread1 = null;
static threadfilter003aTestClass objTC = new threadfilter003aTestClass();
@ -98,7 +97,7 @@ public class threadfilter003a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadthreadfilter003a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadthreadfilter003a("thread1"));
break;
case 1:
@ -149,7 +148,7 @@ public class threadfilter003a {
return PASSED;
}
static class Threadthreadfilter003a extends Thread {
static class Threadthreadfilter003a extends NamedTask {
public Threadthreadfilter003a(String threadName) {
super(threadName);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class threadfilter004a {
//====================================================== test program
static Threadthreadfilter004a thread1 = null;
static Threadthreadfilter004a thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static threadfilter004aTestClass objTC = new threadfilter004aTestClass();
@ -99,8 +98,8 @@ public class threadfilter004a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadthreadfilter004a("thread1");
thread2 = new Threadthreadfilter004a("thread2");
thread1 = JDIThreadFactory.newThread(new Threadthreadfilter004a("thread1"));
thread2 = JDIThreadFactory.newThread(new Threadthreadfilter004a("thread2"));
break;
case 1:
@ -151,21 +150,19 @@ public class threadfilter004a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadthreadfilter004a extends Thread {
static class Threadthreadfilter004a extends NamedTask {
String tName = null;
int tNumber;
public Threadthreadfilter004a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -174,7 +171,7 @@ public class threadfilter004a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.BreakpointRequest.location;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class location001a {
//====================================================== test program
static Threadlocation001a thread1 = null;
static Thread thread1 = null;
static TestClass objTC = new TestClass();
@ -98,7 +97,7 @@ public class location001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Threadlocation001a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadlocation001a("thread1"));
break;
//------------------------------------------------- standard end section
@ -137,21 +136,19 @@ public class location001a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class Threadlocation001a extends Thread {
static class Threadlocation001a extends NamedTask {
String tName = null;
int tNumber;
public Threadlocation001a(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -160,7 +157,7 @@ public class location001a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ClassPrepareRequest.addClassExclusionFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter001a {
//====================================================== test program
static Thread1filter001a thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -101,7 +100,7 @@ public class filter001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1filter001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1filter001a("thread1"));
log1("run1(thread1);");
run1(thread1);
@ -143,7 +142,7 @@ public class filter001a {
}
class Thread1filter001a extends Thread {
class Thread1filter001a extends NamedTask {
class TestClass10{
int var10 = 0;
@ -152,17 +151,14 @@ class Thread1filter001a extends Thread {
int var11 = 0;
}
String tName = null;
public Thread1filter001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter001a.log1(" 'run': enter :: threadName == " + tName);
filter001a.log1(" 'run': enter :: threadName == " + getName());
TestClass11 obj1 = new TestClass11();
filter001a.log1(" 'run': exit :: threadName == " + tName);
filter001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ClassPrepareRequest.addClassExclusionFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter002a {
//====================================================== test program
static Thread1filter002a thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -101,7 +100,7 @@ public class filter002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1filter002a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1filter002a("thread1"));
log1("run1(thread1);");
run1(thread1);
@ -143,7 +142,7 @@ public class filter002a {
}
class Thread1filter002a extends Thread {
class Thread1filter002a extends NamedTask {
class TestClass10{
int var10 = 0;
@ -152,17 +151,14 @@ class Thread1filter002a extends Thread {
int var11 = 0;
}
String tName = null;
public Thread1filter002a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter002a.log1(" 'run': enter :: threadName == " + tName);
filter002a.log1(" 'run': enter :: threadName == " + getName());
TestClass11 obj1 = new TestClass11();
filter002a.log1(" 'run': exit :: threadName == " + tName);
filter002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ClassPrepareRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -98,8 +97,8 @@ public class filter_rt001a {
case 1:
filter_rt001aThread1 thread1 = new filter_rt001aThread1("thread1");
filter_rt001aThread2 thread2 = new filter_rt001aThread2("thread2");
Thread thread1 = JDIThreadFactory.newThread(new filter_rt001aThread1("thread1"));
Thread thread2 = JDIThreadFactory.newThread(new filter_rt001aThread2("thread2"));
log1("new filter_rt001a().run1(thread1);");
new filter_rt001a().run1(thread1);
@ -155,19 +154,16 @@ class filter_rt001aTestClass10{
class filter_rt001aTestClass11 extends filter_rt001aTestClass10{
static int var11 = 0;
}
class filter_rt001aThread1 extends Thread {
String tName = null;
class filter_rt001aThread1 extends NamedTask {
public filter_rt001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt001a.log1(" 'run': enter :: threadName == " + tName);
filter_rt001a.log1(" 'run': enter :: threadName == " + getName());
filter_rt001aTestClass11 obj1 = new filter_rt001aTestClass11();
filter_rt001a.log1(" 'run': exit :: threadName == " + tName);
filter_rt001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
@ -178,19 +174,16 @@ class filter_rt001aTestClass20 {
class filter_rt001aTestClass21 {
static int var21 = 0;
}
class filter_rt001aThread2 extends Thread {
String tName = null;
class filter_rt001aThread2 extends NamedTask {
public filter_rt001aThread2(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt001a.log1(" 'run': enter :: threadName == " + tName);
filter_rt001a.log1(" 'run': enter :: threadName == " + getName());
filter_rt001aTestClass21 obj2 = new filter_rt001aTestClass21();
filter_rt001a.log1(" 'run': exit :: threadName == " + tName);
filter_rt001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ClassPrepareRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter_rt002a {
//====================================================== test program
static filter_rt002aThread1 thread1 = null;
static Thread thread1 = null;
static filter_rt002aTestClass10 obj = new filter_rt002aTestClass10();
@ -98,7 +97,7 @@ public class filter_rt002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new filter_rt002aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new filter_rt002aThread1("thread1"));
break;
//------------------------------------------------- standard end section
@ -149,19 +148,16 @@ class filter_rt002aTestClass10{
class filter_rt002aTestClass11 extends filter_rt002aTestClass10{
static int var11 = 0;
}
class filter_rt002aThread1 extends Thread {
String tName = null;
class filter_rt002aThread1 extends NamedTask {
public filter_rt002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt002a.log1(" 'run': enter :: threadName == " + tName);
filter_rt002a.log1(" 'run': enter :: threadName == " + getName());
filter_rt002aTestClass11 obj1 = new filter_rt002aTestClass11();
filter_rt002a.log1(" 'run': exit :: threadName == " + tName);
filter_rt002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ClassPrepareRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -99,8 +98,8 @@ public class filter_rt003a {
case 1:
filter_rt003aThread1 thread1 = new filter_rt003aThread1("thread1");
filter_rt003aThread2 thread2 = new filter_rt003aThread2("thread2");
Thread thread1 = JDIThreadFactory.newThread(new filter_rt003aThread1("thread1"));
Thread thread2 = JDIThreadFactory.newThread(new filter_rt003aThread2("thread2"));
log1("new filter_rt003a().run1(thread1);");
new filter_rt003a().run1(thread1);
@ -156,19 +155,16 @@ class filter_rt003aTestClass10{
class filter_rt003aTestClass11 extends filter_rt003aTestClass10{
static int var11 = 0;
}
class filter_rt003aThread1 extends Thread {
String tName = null;
class filter_rt003aThread1 extends NamedTask {
public filter_rt003aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt003a.log1(" 'run': enter :: threadName == " + tName);
filter_rt003a.log1(" 'run': enter :: threadName == " + getName());
filter_rt003aTestClass11 obj1 = new filter_rt003aTestClass11();
filter_rt003a.log1(" 'run': exit :: threadName == " + tName);
filter_rt003a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
@ -179,19 +175,16 @@ class filter_rt003aTestClass20 {
class filter_rt003aTestClass21 {
static int var21 = 0;
}
class filter_rt003aThread2 extends Thread {
String tName = null;
class filter_rt003aThread2 extends NamedTask {
public filter_rt003aThread2(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt003a.log1(" 'run': enter :: threadName == " + tName);
filter_rt003a.log1(" 'run': enter :: threadName == " + getName());
filter_rt003aTestClass21 obj2 = new filter_rt003aTestClass21();
filter_rt003a.log1(" 'run': exit :: threadName == " + tName);
filter_rt003a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ClassPrepareRequest.addClassFilter_s;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -98,13 +97,13 @@ public class filter_s001a {
//------------------------------------------------------ section tested
case 0:
Thread1filter_s001a thread1 = new Thread1filter_s001a("thread1");
Thread thread1 = JDIThreadFactory.newThread(new Thread1filter_s001a("thread1"));
log1("new filter_s001a().run1(thread1);");
new filter_s001a().run1(thread1);
break;
case 1:
Thread2filter_s001a thread2 = new Thread2filter_s001a("thread2");
Thread thread2 = JDIThreadFactory.newThread(new Thread2filter_s001a("thread2"));
log1("new filter_s001a().run1(thread2);");
new filter_s001a().run1(thread2);
@ -146,7 +145,7 @@ public class filter_s001a {
}
class Thread1filter_s001a extends Thread {
class Thread1filter_s001a extends NamedTask {
class TestClass10{
int var10 = 0;
@ -155,34 +154,28 @@ class Thread1filter_s001a extends Thread {
int var11 = 0;
}
String tName = null;
public Thread1filter_s001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s001a.log1(" 'run': enter :: threadName == " + tName);
filter_s001a.log1(" 'run': enter :: threadName == " + getName());
TestClass11 obj1 = new TestClass11();
filter_s001a.log1(" 'run': exit :: threadName == " + tName);
filter_s001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
class Thread2filter_s001a extends Thread {
String tName = null;
class Thread2filter_s001a extends NamedTask {
public Thread2filter_s001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s001a.log1(" 'run': enter :: threadName == " + tName);
filter_s001a.log1(" 'run': enter :: threadName == " + getName());
filter_s001aTestClass21 obj2 = new filter_s001aTestClass21();
filter_s001a.log1(" 'run': exit :: threadName == " + tName);
filter_s001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ClassPrepareRequest.addClassFilter_s;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter_s002a {
//====================================================== test program
static Thread1filter_s002a thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -96,7 +95,7 @@ public class filter_s002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1filter_s002a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1filter_s002a("thread1"));
break;
//------------------------------------------------- standard end section
@ -142,7 +141,7 @@ public class filter_s002a {
}
class Thread1filter_s002a extends Thread {
class Thread1filter_s002a extends NamedTask {
class TestClass10{
int var10 = 0;
@ -151,18 +150,14 @@ class Thread1filter_s002a extends Thread {
int var11 = 0;
}
String tName = null;
public Thread1filter_s002a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s002a.log1(" 'run': enter :: threadName == " + tName);
filter_s002a.log1(" 'run': enter :: threadName == " + getName());
TestClass11 obj1 = new TestClass11();
filter_s002a.log1(" 'run': exit :: threadName == " + tName);
filter_s002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,6 @@
package nsk.jdi.ClassType.invokeMethod;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
@ -99,8 +98,8 @@ public class invokemethod001a {
//------------------------------------------------------ section tested
case 0:
Threadinvokemethod001a test_thread =
new Threadinvokemethod001a("testedThread");
Thread test_thread =
JDIThreadFactory.newThread(new Threadinvokemethod001a("testedThread"));
log1(" thread2 is created");
label:
@ -150,7 +149,7 @@ public class invokemethod001a {
}
}
class Threadinvokemethod001a extends Thread {
class Threadinvokemethod001a extends NamedTask {
public Threadinvokemethod001a(String threadName) {
super(threadName);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -46,7 +46,7 @@ public class invokemethod007a {
log = new Log(System.err, argHandler);
waitTime = argHandler.getWaitTime() * 60000;
pipe = argHandler.createDebugeeIOPipe(log);
im007aThread01 thread = null;
Thread thread = null;
pipe.println(invokemethod007.SGNL_READY);
String instr = pipe.readln();
@ -54,7 +54,7 @@ public class invokemethod007a {
// create new thread and start it
if (instr.equals(invokemethod007.SGNL_STRTHRD)) {
thread = new im007aThread01("im007aThread01");
thread = JDIThreadFactory.newThread(new im007aThread01("im007aThread01"));
synchronized(im007aThread01.waitStarting) {
thread.start();
try {
@ -117,7 +117,7 @@ public class invokemethod007a {
}
}
class im007aThread01 extends Thread {
class im007aThread01 extends NamedTask {
public static Object waitInvoking = new Object();
public static Object waitStarting = new Object();
public static Object waitFinishing = new Object();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,8 +34,8 @@ import nsk.share.jdi.*;
*/
public class invokemethod011t {
static Log log;
private invokemethod011Thr thrs[] =
new invokemethod011Thr[invokemethod011.THRDS_NUM-1];
private invokemethod011Thr thrs011[] = new invokemethod011Thr[invokemethod011.THRDS_NUM-1];
private Thread thrs[] = new Thread[invokemethod011.THRDS_NUM-1];
private IOPipe pipe;
public static void main(String args[]) {
@ -103,8 +103,8 @@ public class invokemethod011t {
Object readyObj = new Object();
for (int i=0; i<invokemethod011.THRDS_NUM-1; i++) {
thrs[i] = new invokemethod011Thr(readyObj,
invokemethod011.DEBUGGEE_THRNAMES[i+1]);
thrs011[i] = new invokemethod011Thr(readyObj, invokemethod011.DEBUGGEE_THRNAMES[i+1]);
thrs[i] = JDIThreadFactory.newThread(thrs011[i]);
thrs[i].setDaemon(true);
log.display("Debuggee: starting thread #"
+ i + " \"" + thrs[i].getName() + "\" ...");
@ -127,7 +127,7 @@ public class invokemethod011t {
private void killThreads(int waitTime) {
for (int i=0; i < invokemethod011.THRDS_NUM-1 ; i++) {
thrs[i].doExit = true;
thrs011[i].doExit = true;
try {
thrs[i].join(waitTime);
log.display("Debuggee: thread #"
@ -143,7 +143,7 @@ public class invokemethod011t {
* This is an auxiliary thread class used to check the flag
* INVOKE_SINGLE_THREADED in the debugger.
*/
class invokemethod011Thr extends Thread {
class invokemethod011Thr extends NamedTask {
volatile boolean doExit = false;
private Object readyObj;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,8 +34,8 @@ import nsk.share.jdi.*;
*/
public class invokemethod013t {
static Log log;
private invokemethod013Thr thrs[] =
new invokemethod013Thr[invokemethod013.THRDS_NUM-1];
private invokemethod013Thr thrs013[] = new invokemethod013Thr[invokemethod013.THRDS_NUM-1];
private Thread thrs[] = new Thread[invokemethod013.THRDS_NUM-1];
private IOPipe pipe;
public static void main(String args[]) {
@ -104,8 +104,8 @@ public class invokemethod013t {
Object readyObj = new Object();
for (int i=0; i < invokemethod013.THRDS_NUM-1; i++) {
thrs[i] = new invokemethod013Thr(readyObj,
invokemethod013.DEBUGGEE_THRDS[i+1][0]);
thrs013[i] = new invokemethod013Thr(readyObj, invokemethod013.DEBUGGEE_THRDS[i+1][0]);
thrs[i] = JDIThreadFactory.newThread(thrs013[i]);
thrs[i].setDaemon(true);
log.display("Debuggee: starting thread #"
@ -129,7 +129,7 @@ public class invokemethod013t {
private void killThreads(int waitTime) {
for (int i=0; i < invokemethod013.THRDS_NUM-1 ; i++) {
thrs[i].doExit = true;
thrs013[i].doExit = true;
try {
thrs[i].join(waitTime);
log.display("Debuggee: thread #"
@ -145,7 +145,7 @@ public class invokemethod013t {
* This is an auxiliary thread class used to check method
* invocation in the debugger.
*/
class invokemethod013Thr extends Thread {
class invokemethod013Thr extends NamedTask {
volatile boolean doExit = false;
private Object readyObj;

View File

@ -51,7 +51,7 @@ import com.sun.jdi.request.*;
* The test works as follows. <BR>
* A debugger launchs a debuggee which creates new thread, thread2. <BR>
* The tested class TestClass is specified outside of the class <BR>
* Threadnewinstance002a extends Thread <BR>
* Threadnewinstance002a extends JDITask <BR>
* After getting thread2 running but locked at a monitor <BR>
* the debugger informs the debugger of the thread2 creation <BR>
* and waits for an instruction from it. <BR>

View File

@ -23,7 +23,6 @@
package nsk.jdi.ClassType.newInstance;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
@ -97,8 +96,8 @@ public class newinstance001a {
//------------------------------------------------------ section tested
case 0:
Threadnewinstance001a test_thread =
new Threadnewinstance001a("testedThread");
Thread test_thread =
JDIThreadFactory.newThread(new Threadnewinstance001a("testedThread"));
log1(" thread2 is created");
label:
@ -169,7 +168,7 @@ class TestClass {
}
class Threadnewinstance001a extends Thread {
class Threadnewinstance001a extends NamedTask {
public Threadnewinstance001a(String threadName) {
super(threadName);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -46,7 +46,7 @@ public class newinstance007a {
log = new Log(System.err, argHandler);
waitTime = argHandler.getWaitTime() * 60000;
pipe = argHandler.createDebugeeIOPipe(log);
im007aThread01 thread = null;
Thread thread = null;
pipe.println(newinstance007.SGNL_READY);
String instr = pipe.readln();
@ -54,7 +54,7 @@ public class newinstance007a {
// create new thread and start it
if (instr.equals(newinstance007.SGNL_STRTHRD)) {
thread = new im007aThread01("im007aThread01");
thread = JDIThreadFactory.newThread(new im007aThread01("im007aThread01"));
synchronized(im007aThread01.waitStarting) {
thread.start();
try {
@ -120,7 +120,7 @@ public class newinstance007a {
}
}
class im007aThread01 extends Thread {
class im007aThread01 extends NamedTask {
public static Object waitInvoking = new Object();
public static Object waitStarting = new Object();
public static Object waitFinishing = new Object();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -73,7 +73,7 @@ public class equals001a {
log = new Log(System.err, argHandler);
pipe = argHandler.createDebugeeIOPipe(log);
try {
Thread thread1 = new equals001aThread("thread1");
Thread thread1 = JDIThreadFactory.newThread(new equals001aThread("thread1"));
synchronized (lock) {
synchronized(wait) {
@ -108,7 +108,7 @@ public class equals001a {
//--------------------------------------------------------- test specific classes
class equals001aThread extends Thread {
class equals001aThread extends NamedTask {
String name;
@ -126,7 +126,7 @@ class equals001aThread extends Thread {
foo();
equals001aThread1 thread2 = new equals001aThread1();
Thread thread2 = JDIThreadFactory.newThread(new equals001aThread1());
thread2.start();
try {
@ -147,7 +147,7 @@ class equals001aThread extends Thread {
}
}
class equals001aThread1 extends Thread {
class equals001aThread1 implements Runnable {
public void run() {
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -73,7 +73,7 @@ public class hashcode001a {
log = new Log(System.err, argHandler);
pipe = argHandler.createDebugeeIOPipe(log);
try {
Thread thread1 = new hashcode001aThread("thread1");
Thread thread1 = JDIThreadFactory.newThread(new hashcode001aThread("thread1"));
synchronized (lock) {
synchronized(wait) {
@ -108,7 +108,7 @@ public class hashcode001a {
//--------------------------------------------------------- test specific classes
class hashcode001aThread extends Thread {
class hashcode001aThread extends NamedTask {
String name;
@ -126,7 +126,7 @@ class hashcode001aThread extends Thread {
foo();
hashcode001aThread1 thread2 = new hashcode001aThread1();
Thread thread2 = JDIThreadFactory.newThread(new hashcode001aThread1());
thread2.start();
try {
@ -147,7 +147,7 @@ class hashcode001aThread extends Thread {
}
}
class hashcode001aThread1 extends Thread {
class hashcode001aThread1 implements Runnable {
public void run() {
}
}

View File

@ -106,7 +106,7 @@ public class request001a {
//------------------------------------------------------ section tested
case 0:
thread2 = new Thread3request001a("thread2");
thread2 = JDIThreadFactory.newThread(new Thread3request001a("thread2"));
threadStart(thread2);
try {
// we should wait here for thread2 completion (see 6671428)
@ -119,9 +119,9 @@ public class request001a {
for (int n1 = 0; n1 < threadsN; n1++) {
if (n1 < threadsN-1)
threads[n1] = new Thread1request001a(threadNames[n1]);
threads[n1] = JDIThreadFactory.newThread(new Thread1request001a(threadNames[n1]));
else
threads[n1] = new Thread2request001a(threadNames[n1]);
threads[n1] = JDIThreadFactory.newThread(new Thread2request001a(threadNames[n1]));
}
log1(" threads has been created");
@ -183,7 +183,7 @@ public class request001a {
static volatile int n = 0;
static class Thread1request001a extends Thread {
static class Thread1request001a extends NamedTask {
int threadIndex;
@ -214,7 +214,7 @@ public class request001a {
}
static class Thread2request001a extends Thread {
static class Thread2request001a extends NamedTask {
int threadIndex;
@ -249,21 +249,18 @@ public class request001a {
}
static class Thread3request001a extends Thread {
String tName = null;
static class Thread3request001a extends NamedTask {
public Thread3request001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
log3(" 'run': enter :: threadName == " + tName);
log3(" 'run': enter :: threadName == " + getName());
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log3(" 'run': exit :: threadName == " + tName);
log3(" 'run': exit :: threadName == " + getName());
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -105,7 +105,7 @@ public class nextevent001a {
//------------------------------------------------------ section tested
case 0:
thread2 = new Thread3nextevent001a("thread2");
thread2 = JDIThreadFactory.newThread(new Thread3nextevent001a("thread2"));
threadStart(thread2);
try {
// we should wait here for thread2 completion (see 6671428)
@ -118,9 +118,9 @@ public class nextevent001a {
for (int n1 = 0; n1 < threadsN; n1++) {
if (n1 < threadsN-1)
threads[n1] = new Thread1nextevent001a(threadNames[n1]);
threads[n1] = JDIThreadFactory.newThread(new Thread1nextevent001a(threadNames[n1]));
else
threads[n1] = new Thread2nextevent001a(threadNames[n1]);
threads[n1] = JDIThreadFactory.newThread(new Thread2nextevent001a(threadNames[n1]));
}
log1(" threads has been created");
@ -182,7 +182,7 @@ public class nextevent001a {
static volatile int n = 0;
static class Thread1nextevent001a extends Thread {
static class Thread1nextevent001a extends NamedTask {
int threadIndex;
@ -213,7 +213,7 @@ public class nextevent001a {
}
static class Thread2nextevent001a extends Thread {
static class Thread2nextevent001a extends NamedTask {
int threadIndex;
@ -248,21 +248,18 @@ public class nextevent001a {
}
static class Thread3nextevent001a extends Thread {
String tName = null;
static class Thread3nextevent001a extends NamedTask {
public Thread3nextevent001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
log3(" 'run': enter :: threadName == " + tName);
log3(" 'run': enter :: threadName == " + getName());
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log3(" 'run': exit :: threadName == " + tName);
log3(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.addCountFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class addcountfilter001a {
//====================================================== test program
static Thread1addcountfilter001a thread1 = null;
static Thread thread1 = null;
static TestClass11 obj = new TestClass11();
@ -100,7 +99,7 @@ public class addcountfilter001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1addcountfilter001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1addcountfilter001a("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class TestClass11 extends TestClass10{
}
}
class Thread1addcountfilter001a extends Thread {
String tName = null;
class Thread1addcountfilter001a extends NamedTask {
public Thread1addcountfilter001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
addcountfilter001a.log1(" 'run': enter :: threadName == " + tName);
addcountfilter001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(addcountfilter001a.waitnotifyObj) {
addcountfilter001a.waitnotifyObj.notify();
}
synchronized(addcountfilter001a.lockObj) {
TestClass11.method11();
}
addcountfilter001a.log1(" 'run': exit :: threadName == " + tName);
addcountfilter001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.disable;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class disable001a {
//====================================================== test program
static disable001aThread1 thread1 = null;
static Thread thread1 = null;
static disable001aTestClass11 obj = new disable001aTestClass11();
@ -100,7 +99,7 @@ public class disable001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new disable001aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new disable001aThread1("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class disable001aTestClass11 extends disable001aTestClass10{
}
}
class disable001aThread1 extends Thread {
String tName = null;
class disable001aThread1 extends NamedTask {
public disable001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
disable001a.log1(" 'run': enter :: threadName == " + tName);
disable001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(disable001a.waitnotifyObj) {
disable001a.waitnotifyObj.notify();
}
synchronized(disable001a.lockObj) {
disable001aTestClass11.method11();
}
disable001a.log1(" 'run': exit :: threadName == " + tName);
disable001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -204,22 +204,19 @@ class disable002aTestClass11 extends disable002aTestClass10{
class disable002aThread1 extends Thread {
String tName = null;
public disable002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
disable002a.log1(" 'run': enter :: threadName == " + tName);
disable002a.log1(" 'run': enter :: threadName == " + getName());
synchronized(disable002a.waitnotifyObj) {
disable002a.waitnotifyObj.notify();
}
synchronized(disable002a.lockObj) {
disable002aTestClass11.method11();
}
disable002a.log1(" 'run': exit :: threadName == " + tName);
disable002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -204,22 +204,19 @@ class enable001aTestClass11 extends enable001aTestClass10{
class enable001aThread1 extends Thread {
String tName = null;
public enable001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
enable001a.log1(" 'run': enter :: threadName == " + tName);
enable001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(enable001a.waitnotifyObj) {
enable001a.waitnotifyObj.notify();
}
synchronized(enable001a.lockObj) {
enable001aTestClass11.method11();
}
enable001a.log1(" 'run': exit :: threadName == " + tName);
enable001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -210,22 +210,19 @@ class enable002aTestClass11 extends enable002aTestClass10{
class enable002aThread1 extends Thread {
String tName = null;
public enable002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
enable002a.log1(" 'run': enter :: threadName == " + tName);
enable002a.log1(" 'run': enter :: threadName == " + getName());
synchronized(enable002a.waitnotifyObj) {
enable002a.waitnotifyObj.notify();
}
synchronized(enable002a.lockObj) {
enable002aTestClass11.method11();
}
enable002a.log1(" 'run': exit :: threadName == " + tName);
enable002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.getProperty;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class getproperty001a {
//====================================================== test program
static Thread1getproperty001a thread1 = null;
static Thread thread1 = null;
static TestClass11 obj = new TestClass11();
@ -100,7 +99,7 @@ public class getproperty001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1getproperty001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1getproperty001a("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class TestClass11 extends TestClass10{
}
}
class Thread1getproperty001a extends Thread {
String tName = null;
class Thread1getproperty001a extends NamedTask {
public Thread1getproperty001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
getproperty001a.log1(" 'run': enter :: threadName == " + tName);
getproperty001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(getproperty001a.waitnotifyObj) {
getproperty001a.waitnotifyObj.notify();
}
synchronized(getproperty001a.lockObj) {
TestClass11.method11();
}
getproperty001a.log1(" 'run': exit :: threadName == " + tName);
getproperty001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.isEnabled;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class isenabled001a {
//====================================================== test program
static Thread1isenabled001a thread1 = null;
static Thread thread1 = null;
static TestClass11 obj = new TestClass11();
@ -100,7 +99,7 @@ public class isenabled001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1isenabled001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1isenabled001a("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class TestClass11 extends TestClass10{
}
}
class Thread1isenabled001a extends Thread {
String tName = null;
class Thread1isenabled001a extends NamedTask {
public Thread1isenabled001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
isenabled001a.log1(" 'run': enter :: threadName == " + tName);
isenabled001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(isenabled001a.waitnotifyObj) {
isenabled001a.waitnotifyObj.notify();
}
synchronized(isenabled001a.lockObj) {
TestClass11.method11();
}
isenabled001a.log1(" 'run': exit :: threadName == " + tName);
isenabled001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.putProperty;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class putproperty001a {
//====================================================== test program
static Thread1putproperty001a thread1 = null;
static Thread thread1 = null;
static TestClass11 obj = new TestClass11();
@ -100,7 +99,7 @@ public class putproperty001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1putproperty001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1putproperty001a("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class TestClass11 extends TestClass10{
}
}
class Thread1putproperty001a extends Thread {
String tName = null;
class Thread1putproperty001a extends NamedTask {
public Thread1putproperty001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
putproperty001a.log1(" 'run': enter :: threadName == " + tName);
putproperty001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(putproperty001a.waitnotifyObj) {
putproperty001a.waitnotifyObj.notify();
}
synchronized(putproperty001a.lockObj) {
TestClass11.method11();
}
putproperty001a.log1(" 'run': exit :: threadName == " + tName);
putproperty001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.setEnabled;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class setenabled001a {
//====================================================== test program
static setenabled001aThread1 thread1 = null;
static Thread thread1 = null;
static setenabled001aTestClass11 obj = new setenabled001aTestClass11();
@ -100,7 +99,7 @@ public class setenabled001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new setenabled001aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new setenabled001aThread1("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class setenabled001aTestClass11 extends setenabled001aTestClass10{
}
}
class setenabled001aThread1 extends Thread {
String tName = null;
class setenabled001aThread1 extends NamedTask {
public setenabled001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
setenabled001a.log1(" 'run': enter :: threadName == " + tName);
setenabled001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(setenabled001a.waitnotifyObj) {
setenabled001a.waitnotifyObj.notify();
}
synchronized(setenabled001a.lockObj) {
setenabled001aTestClass11.method11();
}
setenabled001a.log1(" 'run': exit :: threadName == " + tName);
setenabled001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.setEnabled;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class setenabled002a {
//====================================================== test program
static setenabled002aThread1 thread1 = null;
static Thread thread1 = null;
static setenabled002aTestClass11 obj = new setenabled002aTestClass11();
@ -100,7 +99,7 @@ public class setenabled002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new setenabled002aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new setenabled002aThread1("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -208,24 +207,21 @@ class setenabled002aTestClass11 extends setenabled002aTestClass10{
}
}
class setenabled002aThread1 extends Thread {
String tName = null;
class setenabled002aThread1 extends NamedTask {
public setenabled002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
setenabled002a.log1(" 'run': enter :: threadName == " + tName);
setenabled002a.log1(" 'run': enter :: threadName == " + getName());
synchronized(setenabled002a.waitnotifyObj) {
setenabled002a.waitnotifyObj.notify();
}
synchronized(setenabled002a.lockObj) {
setenabled002aTestClass11.method11();
}
setenabled002a.log1(" 'run': exit :: threadName == " + tName);
setenabled002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.setEnabled;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class setenabled003a {
//====================================================== test program
static Thread1setenabled003a thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -96,7 +95,7 @@ public class setenabled003a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1setenabled003a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1setenabled003a("thread1"));
Thread1setenabled003a.method();
break;
@ -152,23 +151,20 @@ public class setenabled003a {
}
}
class Thread1setenabled003a extends Thread {
String tName = null;
class Thread1setenabled003a extends NamedTask {
public Thread1setenabled003a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
setenabled003a.log1(" 'run': enter :: threadName == " + tName);
setenabled003a.log1(" 'run': enter :: threadName == " + getName());
synchronized(setenabled003a.waitnotifyObj) {
setenabled003a.waitnotifyObj.notify();
}
synchronized(setenabled003a.lockObj) {
setenabled003a.log1(" 'run': exit :: threadName == " + tName);
setenabled003a.log1(" 'run': exit :: threadName == " + getName());
}
return;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.setSuspendPolicy;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class setsuspendpolicy001a {
//====================================================== test program
static Thread1setsuspendpolicy001a thread1 = null;
static Thread thread1 = null;
static TestClass11 obj = new TestClass11();
@ -100,7 +99,7 @@ public class setsuspendpolicy001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1setsuspendpolicy001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1setsuspendpolicy001a("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class TestClass11 extends TestClass10{
}
}
class Thread1setsuspendpolicy001a extends Thread {
String tName = null;
class Thread1setsuspendpolicy001a extends NamedTask {
public Thread1setsuspendpolicy001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
setsuspendpolicy001a.log1(" 'run': enter :: threadName == " + tName);
setsuspendpolicy001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(setsuspendpolicy001a.waitnotifyObj) {
setsuspendpolicy001a.waitnotifyObj.notify();
}
synchronized(setsuspendpolicy001a.lockObj) {
TestClass11.method11();
}
setsuspendpolicy001a.log1(" 'run': exit :: threadName == " + tName);
setsuspendpolicy001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequest.suspendPolicy;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class suspendpolicy001a {
//====================================================== test program
static Thread1suspendpolicy001a thread1 = null;
static Thread thread1 = null;
static TestClass11 obj = new TestClass11();
@ -100,7 +99,7 @@ public class suspendpolicy001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1suspendpolicy001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1suspendpolicy001a("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -202,24 +201,21 @@ class TestClass11 extends TestClass10{
}
}
class Thread1suspendpolicy001a extends Thread {
String tName = null;
class Thread1suspendpolicy001a extends NamedTask {
public Thread1suspendpolicy001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
suspendpolicy001a.log1(" 'run': enter :: threadName == " + tName);
suspendpolicy001a.log1(" 'run': enter :: threadName == " + getName());
synchronized(suspendpolicy001a.waitnotifyObj) {
suspendpolicy001a.waitnotifyObj.notify();
}
synchronized(suspendpolicy001a.lockObj) {
TestClass11.method11();
}
suspendpolicy001a.log1(" 'run': exit :: threadName == " + tName);
suspendpolicy001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequestManager.createStepRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class crstepreq002a {
//====================================================== test program
static Thread1crstepreq002a thread1 = null;
static Thread thread1 = null;
static TestClass10 obj = new TestClass10();
@ -98,7 +97,7 @@ public class crstepreq002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1crstepreq002a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1crstepreq002a("thread1"));
synchronized (lockObj) {
threadStart(thread1);
@ -149,24 +148,21 @@ class TestClass11 extends TestClass10{
}
}
class Thread1crstepreq002a extends Thread {
String tName = null;
class Thread1crstepreq002a extends NamedTask {
public Thread1crstepreq002a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
crstepreq002a.log1(" 'run': enter :: threadName == " + tName);
crstepreq002a.log1(" 'run': enter :: threadName == " + getName());
synchronized(crstepreq002a.waitnotifyObj) {
crstepreq002a.waitnotifyObj.notify();
}
synchronized(crstepreq002a.lockObj) {
TestClass11.m11();
}
crstepreq002a.log1(" 'run': exit :: threadName == " + tName);
crstepreq002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,21 +72,21 @@ public class crstepreq003a {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test case section
case 0:
Thread thread0 = new Thread0crstepreq003a("thread0");
Thread thread0 = JDIThreadFactory.newThread(new Thread0crstepreq003a("thread0"));
threadStart(thread0);
threadJoin (thread0, "0");
break;
case 1:
Thread thread1 = new Thread0crstepreq003a("thread1");
Thread thread1 = JDIThreadFactory.newThread(new Thread0crstepreq003a("thread1"));
threadStart(thread1);
threadJoin (thread1, "1");
break;
case 2:
Thread thread2 = new Thread0crstepreq003a("thread2");
Thread thread2 = JDIThreadFactory.newThread(new Thread0crstepreq003a("thread2"));
threadStart(thread2);
threadJoin (thread2, "2");
@ -160,7 +160,7 @@ public class crstepreq003a {
/**
* This thread will be suspended on breakpoint. No locks are used.
*/
class Thread0crstepreq003a extends Thread {
class Thread0crstepreq003a extends NamedTask {
public Thread0crstepreq003a (String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -95,8 +95,8 @@ public class crstepreq004a {
private static void runTestCase(int testCaseId) {
isFirstThreadReady = false;
isSecondThreadReady = false;
Thread thread1 = new Thread1crstepreq004a("thread1");
Thread thread2 = new Thread2crstepreq004a("thread2");
Thread thread1 = JDIThreadFactory.newThread(new Thread1crstepreq004a("thread1"));
Thread thread2 = JDIThreadFactory.newThread(new Thread2crstepreq004a("thread2"));
synchronized (lockObj) {
thread1.start();
while (!isFirstThreadReady) {
@ -167,7 +167,7 @@ public class crstepreq004a {
/**
* First thread which owns and locks the crstepreq004a.lockObj1 monitor .
*/
class Thread1crstepreq004a extends Thread {
class Thread1crstepreq004a extends NamedTask {
public Thread1crstepreq004a (String name) {
super(name);
}
@ -182,7 +182,7 @@ class Thread1crstepreq004a extends Thread {
/**
* Second thread which who owns the crstepreq004a.lockObj1 monitor .
*/
class Thread2crstepreq004a extends Thread {
class Thread2crstepreq004a extends NamedTask {
public Thread2crstepreq004a (String name) {
super(name);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,11 +24,11 @@
package nsk.jdi.EventRequestManager.createStepRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
/**
* The debugged application of the test.
*/
@ -83,7 +83,7 @@ public class crstepreq005a {
label0:
for (int testCase = 0; testCase < maxCase && instruction != quit; testCase++) {
thread1 = new Thread0crstepreq005a(testCase);
thread1 = JDIThreadFactory.newThread(new Thread0crstepreq005a(testCase));
threadStart(thread1);
threadJoin (thread1, testCase);
@ -125,7 +125,7 @@ public class crstepreq005a {
/**
* This thread will be suspended on breakpoint. No locks are used.
*/
class Thread0crstepreq005a extends Thread {
class Thread0crstepreq005a extends NamedTask {
int testCase;
public Thread0crstepreq005a (int testCase) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,11 +24,11 @@
package nsk.jdi.EventRequestManager.createStepRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
/**
* The debugged application of the test.
*/
@ -83,7 +83,7 @@ public class crstepreq006a {
label0:
for (int testCase = 0; testCase < maxCase && instruction != quit; testCase++) {
thread1 = new Thread0crstepreq006a(testCase);
thread1 = JDIThreadFactory.newThread(new Thread0crstepreq006a(testCase));
threadStart(thread1);
threadJoin (thread1, testCase);
@ -125,7 +125,7 @@ public class crstepreq006a {
/**
* This thread will be suspended on breakpoint. No locks are used.
*/
class Thread0crstepreq006a extends Thread {
class Thread0crstepreq006a extends NamedTask {
int testCase;
public Thread0crstepreq006a (int testCase) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,11 +24,11 @@
package nsk.jdi.EventRequestManager.createStepRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
/**
* The debugged application of the test.
*/
@ -83,7 +83,7 @@ public class crstepreq007a {
label0:
for (int testCase = 0; testCase < maxCase && instruction != quit; testCase++) {
thread1 = new Thread0crstepreq007a(testCase);
thread1 = JDIThreadFactory.newThread(new Thread0crstepreq007a(testCase));
threadStart(thread1);
threadJoin (thread1, testCase);
@ -125,7 +125,7 @@ public class crstepreq007a {
/**
* This thread will be suspended on breakpoint. No locks are used.
*/
class Thread0crstepreq007a extends Thread {
class Thread0crstepreq007a extends NamedTask {
int testCase;
public Thread0crstepreq007a (int testCase) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,11 +24,11 @@
package nsk.jdi.EventRequestManager.createStepRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
/**
* The debugged application of the test.
*/
@ -83,7 +83,7 @@ public class crstepreq008a {
label0:
for (int testCase = 0; testCase < maxCase && instruction != quit; testCase++) {
thread1 = new Thread0crstepreq008a(testCase);
thread1 = JDIThreadFactory.newThread(new Thread0crstepreq008a(testCase));
threadStart(thread1);
threadJoin (thread1, testCase);
@ -125,7 +125,7 @@ public class crstepreq008a {
/**
* This thread will be suspended on breakpoint. No locks are used.
*/
class Thread0crstepreq008a extends Thread {
class Thread0crstepreq008a extends NamedTask {
int testCase;
public Thread0crstepreq008a (int testCase) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,11 +24,11 @@
package nsk.jdi.EventRequestManager.createStepRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
/**
* The debugged application of the test.
*/
@ -83,7 +83,7 @@ public class crstepreq009a {
label0:
for (int testCase = 0; testCase < maxCase && instruction != quit; testCase++) {
thread1 = new Thread0crstepreq009a(testCase);
thread1 = JDIThreadFactory.newThread(new Thread0crstepreq009a(testCase));
threadStart(thread1);
threadJoin (thread1, testCase);
@ -125,7 +125,7 @@ public class crstepreq009a {
/**
* This thread will be suspended on breakpoint. No locks are used.
*/
class Thread0crstepreq009a extends Thread {
class Thread0crstepreq009a extends NamedTask {
int testCase;
public Thread0crstepreq009a (int testCase) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,11 +24,11 @@
package nsk.jdi.EventRequestManager.createStepRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
// THIS TEST IS LINE NUMBER SENSITIVE
/**
* The debugged application of the test.
*/
@ -83,7 +83,7 @@ public class crstepreq010a {
label0:
for (int testCase = 0; testCase < maxCase && instruction != quit; testCase++) {
thread1 = new Thread0crstepreq010a(testCase);
thread1 = JDIThreadFactory.newThread(new Thread0crstepreq010a(testCase));
threadStart(thread1);
threadJoin (thread1, testCase);
@ -125,7 +125,7 @@ public class crstepreq010a {
/**
* This thread will be suspended on breakpoint. No locks are used.
*/
class Thread0crstepreq010a extends Thread {
class Thread0crstepreq010a extends NamedTask {
int testCase;
public Thread0crstepreq010a (int testCase) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequestManager.deleteEventRequest;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -56,7 +55,7 @@ public class delevtreq002a {
static int testField1 = 0;
static NullPointerException testField2 = new NullPointerException("test");
static Thread1delevtreq002a testField3 = null;
static Thread testField3 = null;
//------------------------------------------------------ common section
@ -99,7 +98,7 @@ public class delevtreq002a {
case 0:
synchronized (lockObj1) {
testField3 = new Thread1delevtreq002a("thread1");
testField3 = JDIThreadFactory.newThread(new Thread1delevtreq002a("thread1"));
threadStart(testField3);
methodForCommunication();
}
@ -136,22 +135,19 @@ public class delevtreq002a {
}
}
class Thread1delevtreq002a extends Thread {
String tName = null;
class Thread1delevtreq002a extends NamedTask {
public Thread1delevtreq002a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
delevtreq002a.log1(" 'run': enter :: threadName == " + tName);
delevtreq002a.log1(" 'run': enter :: threadName == " + getName());
synchronized(delevtreq002a.waitnotifyObj) {
delevtreq002a.waitnotifyObj.notify();
}
synchronized(delevtreq002a.lockObj1) {
delevtreq002a.log1(" 'run': exit :: threadName == " + tName);
delevtreq002a.log1(" 'run': exit :: threadName == " + getName());
}
return;
}

View File

@ -24,7 +24,6 @@
package nsk.jdi.EventRequestManager.deleteEventRequests;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -56,7 +55,7 @@ public class delevtreqs002a {
static int testField1 = 0;
static NullPointerException testField2 = new NullPointerException("test");
static Thread1delevtreqs002a testField3[] = new Thread1delevtreqs002a[10];
static Thread testField3[] = new Thread[10];
//------------------------------------------------------ common section
@ -100,7 +99,7 @@ public class delevtreqs002a {
case 0:
synchronized (lockObj1) {
for (int ii = 0; ii < 10; ii++) {
testField3[ii] = new Thread1delevtreqs002a("thread" + ii);
testField3[ii] = JDIThreadFactory.newThread(new Thread1delevtreqs002a("thread" + ii));
threadStart(testField3[ii]);
}
methodForCommunication();
@ -138,22 +137,19 @@ public class delevtreqs002a {
}
class Thread1delevtreqs002a extends Thread {
String tName = null;
class Thread1delevtreqs002a extends NamedTask {
public Thread1delevtreqs002a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
delevtreqs002a.log1(" 'run': enter :: threadName == " + tName);
delevtreqs002a.log1(" 'run': enter :: threadName == " + getName());
synchronized(delevtreqs002a.waitnotifyObj) {
delevtreqs002a.waitnotifyObj.notify();
}
synchronized(delevtreqs002a.lockObj1) {
delevtreqs002a.log1(" 'run': exit :: threadName == " + tName);
delevtreqs002a.log1(" 'run': exit :: threadName == " + getName());
}
return;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,6 @@
package nsk.jdi.EventRequestManager.stepRequests;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
@ -61,8 +60,8 @@ public class stepreq001t {
// Get a monitor in order to prevent the threads from exiting
synchronized(lockObj) {
for (int i=1; i<stepreq001.THRDS_NUM; i++) {
thrs[i] = new stepreq001a(readyObj, lockObj,
stepreq001.DEBUGGEE_THRDS[i]);
thrs[i] = JDIThreadFactory.newThread(new stepreq001a(readyObj, lockObj,
stepreq001.DEBUGGEE_THRDS[i]));
thrs[i].setDaemon(stepreq001.DAEMON_THRDS[i]);
if (argHandler.verbose())
System.out.println("Debuggee: starting thread #"
@ -110,7 +109,7 @@ public class stepreq001t {
stepreq001.PASSED;
}
class stepreq001a extends Thread {
class stepreq001a extends NamedTask {
private Object readyObj;
private Object lockObj;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventRequestManager.stepRequests;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class stepreq002a {
//====================================================== test program
static Thread1stepreq002a testField[] = new Thread1stepreq002a[10];
static Thread testField[] = new Thread[10];
//------------------------------------------------------ common section
@ -98,7 +97,7 @@ public class stepreq002a {
case 0:
synchronized (lockObj1) {
for (int ii = 0; ii < 10; ii++) {
testField[ii] = new Thread1stepreq002a("thread" + ii);
testField[ii] = JDIThreadFactory.newThread(new Thread1stepreq002a("thread" + ii));
threadStart(testField[ii]);
}
methodForCommunication();
@ -137,22 +136,19 @@ public class stepreq002a {
}
class Thread1stepreq002a extends Thread {
String tName = null;
class Thread1stepreq002a extends NamedTask {
public Thread1stepreq002a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
stepreq002a.log1(" 'run': enter :: threadName == " + tName);
stepreq002a.log1(" 'run': enter :: threadName == " + getName());
synchronized(stepreq002a.waitnotifyObj) {
stepreq002a.waitnotifyObj.notify();
}
synchronized(stepreq002a.lockObj1) {
stepreq002a.log1(" 'run': exit :: threadName == " + tName);
stepreq002a.log1(" 'run': exit :: threadName == " + getName());
}
return;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -84,7 +84,7 @@ public class eventiterator003a {
log = argHandler.createDebugeeLog();
log1("debuggee started!");
thread2 = new Thread2eventiterator003a("thread2");
thread2 = JDIThreadFactory.newThread(new Thread2eventiterator003a("thread2"));
methodForCommunication();
threadStart(thread2);
@ -112,7 +112,7 @@ public class eventiterator003a {
return PASSED;
}
static class Thread2eventiterator003a extends Thread {
static class Thread2eventiterator003a extends NamedTask {
public Thread2eventiterator003a(String threadName) {
super(threadName);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventSet.resume;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,9 +53,9 @@ public class resume008a {
//====================================================== test program
static Threadresume008a thread0 = null;
static Threadresume008a thread1 = null;
static Threadresume008a thread2 = null;
static Thread thread0 = null;
static Thread thread1 = null;
static Thread thread2 = null;
//------------------------------------------------------ common section
@ -96,10 +95,10 @@ public class resume008a {
switch (i) {
//------------------------------------------------------ section tested
case 0:
thread0 = new Threadresume008a("thread0");
thread0 = JDIThreadFactory.newThread(new Threadresume008a("thread0"));
methodForCommunication();
threadStart(thread0);
thread1 = new Threadresume008a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadresume008a("thread1"));
// Wait for debugger to complete the first test case
// before advancing to the first breakpoint
waitForTestCase(0);
@ -107,7 +106,7 @@ public class resume008a {
break;
case 1:
threadStart(thread1);
thread2 = new Threadresume008a("thread2");
thread2 = JDIThreadFactory.newThread(new Threadresume008a("thread2"));
methodForCommunication();
break;
case 2:
@ -148,18 +147,17 @@ public class resume008a {
}
}
}
static class Threadresume008a extends Thread {
String tName = null;
static class Threadresume008a extends NamedTask {
public Threadresume008a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventSet.resume;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,9 +53,9 @@ public class resume009a {
//====================================================== test program
static Threadresume009a thread0 = null;
static Threadresume009a thread1 = null;
static Threadresume009a thread2 = null;
static Thread thread0 = null;
static Thread thread1 = null;
static Thread thread2 = null;
//------------------------------------------------------ common section
@ -99,12 +98,12 @@ public class resume009a {
//------------------------------------------------------ section tested
case 0:
thread0 = new Threadresume009a("thread0");
thread0 = JDIThreadFactory.newThread(new Threadresume009a("thread0"));
methodForCommunication();
threadRun(thread0);
thread1 = new Threadresume009a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadresume009a("thread1"));
// Wait for debugger to complete the first test case
// before advancing to the first breakpoint
waitForTestCase(0);
@ -114,7 +113,7 @@ public class resume009a {
case 1:
threadRun(thread1);
thread2 = new Threadresume009a("thread2");
thread2 = JDIThreadFactory.newThread(new Threadresume009a("thread2"));
methodForCommunication();
break;
@ -167,21 +166,18 @@ public class resume009a {
}
}
static class Threadresume009a extends Thread {
String tName = null;
static class Threadresume009a extends NamedTask {
public Threadresume009a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventSet.suspendPolicy;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,13 +53,13 @@ public class suspendpolicy008a {
//====================================================== test program
static Threadsuspendpolicy008a thread0 = null;
static Threadsuspendpolicy008a thread1 = null;
static Threadsuspendpolicy008a thread2 = null;
static Threadsuspendpolicy008a thread3 = null;
static Threadsuspendpolicy008a thread4 = null;
static Threadsuspendpolicy008a thread5 = null;
static Threadsuspendpolicy008a thread6 = null;
static Thread thread0 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static Thread thread3 = null;
static Thread thread4 = null;
static Thread thread5 = null;
static Thread thread6 = null;
//------------------------------------------------------ common section
@ -105,47 +104,47 @@ public class suspendpolicy008a {
//------------------------------------------------------ section tested
case 0:
thread0 = new Threadsuspendpolicy008a("thread0");
thread0 = JDIThreadFactory.newThread(new Threadsuspendpolicy008a("thread0"));
methodForCommunication();
threadStart(thread0);
thread1 = new Threadsuspendpolicy008a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadsuspendpolicy008a("thread1"));
methodForCommunication();
break;
case 1:
threadStart(thread1);
thread2 = new Threadsuspendpolicy008a("thread2");
thread2 = JDIThreadFactory.newThread(new Threadsuspendpolicy008a("thread2"));
methodForCommunication();
break;
case 2:
threadStart(thread2);
thread3 = new Threadsuspendpolicy008a("thread3");
thread3 = JDIThreadFactory.newThread(new Threadsuspendpolicy008a("thread3"));
methodForCommunication();
break;
case 3:
threadStart(thread3);
thread4 = new Threadsuspendpolicy008a("thread4");
thread4 = JDIThreadFactory.newThread(new Threadsuspendpolicy008a("thread4"));
methodForCommunication();
break;
case 4:
threadStart(thread4);
thread5 = new Threadsuspendpolicy008a("thread5");
thread5 = JDIThreadFactory.newThread(new Threadsuspendpolicy008a("thread5"));
methodForCommunication();
break;
case 5:
threadStart(thread5);
thread6 = new Threadsuspendpolicy008a("thread6");
thread6 = JDIThreadFactory.newThread(new Threadsuspendpolicy008a("thread6"));
methodForCommunication();
break;
@ -180,21 +179,18 @@ public class suspendpolicy008a {
return PASSED;
}
static class Threadsuspendpolicy008a extends Thread {
String tName = null;
static class Threadsuspendpolicy008a extends NamedTask {
public Threadsuspendpolicy008a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.EventSet.suspendPolicy;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,13 +53,13 @@ public class suspendpolicy009a {
//====================================================== test program
static Threadsuspendpolicy009a thread0 = null;
static Threadsuspendpolicy009a thread1 = null;
static Threadsuspendpolicy009a thread2 = null;
static Threadsuspendpolicy009a thread3 = null;
static Threadsuspendpolicy009a thread4 = null;
static Threadsuspendpolicy009a thread5 = null;
static Threadsuspendpolicy009a thread6 = null;
static Thread thread0 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static Thread thread3 = null;
static Thread thread4 = null;
static Thread thread5 = null;
static Thread thread6 = null;
//------------------------------------------------------ common section
@ -105,7 +104,7 @@ public class suspendpolicy009a {
//------------------------------------------------------ section tested
case 0:
thread0 = new Threadsuspendpolicy009a("thread0");
thread0 = JDIThreadFactory.newThread(new Threadsuspendpolicy009a("thread0"));
methodForCommunication();
threadStart(thread0);
@ -113,7 +112,7 @@ public class suspendpolicy009a {
thread0.join();
} catch (InterruptedException e) {
}
thread1 = new Threadsuspendpolicy009a("thread1");
thread1 = JDIThreadFactory.newThread(new Threadsuspendpolicy009a("thread1"));
methodForCommunication();
break;
@ -123,7 +122,7 @@ public class suspendpolicy009a {
thread1.join();
} catch (InterruptedException e) {
}
thread2 = new Threadsuspendpolicy009a("thread2");
thread2 = JDIThreadFactory.newThread(new Threadsuspendpolicy009a("thread2"));
methodForCommunication();
break;
@ -133,7 +132,7 @@ public class suspendpolicy009a {
thread2.join();
} catch (InterruptedException e) {
}
thread3 = new Threadsuspendpolicy009a("thread3");
thread3 = JDIThreadFactory.newThread(new Threadsuspendpolicy009a("thread3"));
methodForCommunication();
break;
@ -143,7 +142,7 @@ public class suspendpolicy009a {
thread3.join();
} catch (InterruptedException e) {
}
thread4 = new Threadsuspendpolicy009a("thread4");
thread4 = JDIThreadFactory.newThread(new Threadsuspendpolicy009a("thread4"));
methodForCommunication();
break;
@ -153,7 +152,7 @@ public class suspendpolicy009a {
thread4.join();
} catch (InterruptedException e) {
}
thread5 = new Threadsuspendpolicy009a("thread5");
thread5 = JDIThreadFactory.newThread(new Threadsuspendpolicy009a("thread5"));
methodForCommunication();
break;
@ -163,7 +162,7 @@ public class suspendpolicy009a {
thread5.join();
} catch (InterruptedException e) {
}
thread6 = new Threadsuspendpolicy009a("thread6");
thread6 = JDIThreadFactory.newThread(new Threadsuspendpolicy009a("thread6"));
methodForCommunication();
break;
@ -201,21 +200,18 @@ public class suspendpolicy009a {
return PASSED;
}
static class Threadsuspendpolicy009a extends Thread {
String tName = null;
static class Threadsuspendpolicy009a extends NamedTask {
public Threadsuspendpolicy009a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addClassExclusionFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class filter001a {
//====================================================== test program
static Thread1filter001a thread1 = null;
static Thread2filter001a thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
//------------------------------------------------------ common section
@ -101,13 +100,13 @@ public class filter001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1filter001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1filter001a("thread1"));
log1("new filter001a().run1(thread1);");
new filter001a().run1(thread1);
break;
case 1:
thread2 = new Thread2filter001a("thread2");
thread2 = JDIThreadFactory.newThread(new Thread2filter001a("thread2"));
log1("new filter001a().run1(thread2);");
new filter001a().run1(thread2);
@ -148,7 +147,7 @@ public class filter001a {
}
}
class Thread1filter001a extends Thread {
class Thread1filter001a extends NamedTask {
class TestClass10{
void m10() {
@ -166,26 +165,22 @@ class Thread1filter001a extends Thread {
}
}
String tName = null;
public Thread1filter001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter001a.log1(" 'run': enter :: threadName == " + tName);
filter001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new TestClass11()).m11();
} catch ( NullPointerException e) {
}
filter001a.log1(" 'run': exit :: threadName == " + tName);
filter001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
class Thread2filter001a extends Thread {
class Thread2filter001a extends NamedTask {
class TestClass20{
void m20() {
@ -203,20 +198,17 @@ class Thread2filter001a extends Thread {
}
}
String tName = null;
public Thread2filter001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter001a.log1(" 'run': enter :: threadName == " + tName);
filter001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new TestClass21()).m21();
} catch ( NullPointerException e) {
}
filter001a.log1(" 'run': exit :: threadName == " + tName);
filter001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class filter_rt001a {
//====================================================== test program
static filter_rt001aThread1 thread1 = new filter_rt001aThread1("thread1");
static filter_rt001aThread2 thread2 = new filter_rt001aThread2("thread2");
static Thread thread1 = JDIThreadFactory.newThread(new filter_rt001aThread1("thread1"));
static Thread thread2 = JDIThreadFactory.newThread(new filter_rt001aThread2("thread2"));
static filter_rt001aTestClass11 obj = new filter_rt001aTestClass11();
//------------------------------------------------------ common section
@ -162,27 +161,24 @@ class filter_rt001aTestClass11 extends filter_rt001aTestClass10{
}
}
class filter_rt001aThread1 extends Thread {
String tName = null;
class filter_rt001aThread1 extends NamedTask {
public filter_rt001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt001a.log1(" 'run': enter :: threadName == " + tName);
filter_rt001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_rt001aTestClass11()).m11();
} catch ( NullPointerException e) {
}
filter_rt001a.log1(" 'run': exit :: threadName == " + tName);
filter_rt001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
class filter_rt001aThread2 extends Thread {
class filter_rt001aThread2 extends NamedTask {
class filter_rt001aTestClass20{
void m20() {
@ -200,20 +196,17 @@ class filter_rt001aThread2 extends Thread {
}
}
String tName = null;
public filter_rt001aThread2(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt001a.log1(" 'run': enter :: threadName == " + tName);
filter_rt001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_rt001aTestClass21()).m21();
} catch ( NullPointerException e) {
}
filter_rt001a.log1(" 'run': exit :: threadName == " + tName);
filter_rt001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter_rt002a {
//====================================================== test program
static filter_rt002aThread1 thread1 = null;
static Thread thread1 = null;
static filter_rt002aTestClass10 obj = new filter_rt002aTestClass10();
@ -98,7 +97,7 @@ public class filter_rt002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new filter_rt002aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new filter_rt002aThread1("thread1"));
break;
//------------------------------------------------- standard end section
@ -162,22 +161,19 @@ class filter_rt002aTestClass11 extends filter_rt002aTestClass10{
}
}
class filter_rt002aThread1 extends Thread {
String tName = null;
class filter_rt002aThread1 extends NamedTask {
public filter_rt002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt002a.log1(" 'run': enter :: threadName == " + tName);
filter_rt002a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_rt002aTestClass11()).m11();
} catch ( NullPointerException e) {
}
filter_rt002a.log1(" 'run': exit :: threadName == " + tName);
filter_rt002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class filter_rt003a {
//====================================================== test program
static filter_rt003aThread1 thread1 = null;
static filter_rt003aThread2 thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
//------------------------------------------------------ common section
@ -84,8 +83,8 @@ public class filter_rt003a {
filter_rt003aTestClass11 obj1 = new filter_rt003aTestClass11();
filter_rt003aTestClass21 obj2 = new filter_rt003aTestClass21();
thread1 = new filter_rt003aThread1("thread1");
thread2 = new filter_rt003aThread2("thread2");
thread1 = JDIThreadFactory.newThread(new filter_rt003aThread1("thread1"));
thread2 = JDIThreadFactory.newThread(new filter_rt003aThread2("thread2"));
log1("debuggee started!");
@ -167,22 +166,19 @@ class filter_rt003aTestClass11 extends filter_rt003aTestClass10{
}
}
class filter_rt003aThread1 extends Thread {
String tName = null;
class filter_rt003aThread1 extends NamedTask {
public filter_rt003aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt003a.log1(" 'run': enter :: threadName == " + tName);
filter_rt003a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_rt003aTestClass11()).m11();
} catch ( NullPointerException e) {
}
filter_rt003a.log1(" 'run': exit :: threadName == " + tName);
filter_rt003a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
@ -204,22 +200,19 @@ class filter_rt003aTestClass21 extends filter_rt003aTestClass20{
}
}
class filter_rt003aThread2 extends Thread {
String tName = null;
class filter_rt003aThread2 extends NamedTask {
public filter_rt003aThread2(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt003a.log1(" 'run': enter :: threadName == " + tName);
filter_rt003a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_rt003aTestClass21()).m21();
} catch ( NullPointerException e) {
}
filter_rt003a.log1(" 'run': exit :: threadName == " + tName);
filter_rt003a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addClassFilter_s;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class filter_s001a {
//====================================================== test program
static filter_s001aThread1 thread1 = null;
static filter_s001aThread2 thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
//------------------------------------------------------ common section
@ -101,14 +100,14 @@ public class filter_s001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new filter_s001aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new filter_s001aThread1("thread1"));
log1("new filter_s001a().run1(thread1);");
new filter_s001a().run1(thread1);
break;
case 1:
thread2 = new filter_s001aThread2("thread2");
thread2 = JDIThreadFactory.newThread(new filter_s001aThread2("thread2"));
log1("new filter_s001a().run1(thread2);");
new filter_s001a().run1(thread2);
@ -166,27 +165,24 @@ class filter_s001aTestClass11 extends filter_s001aTestClass10{
}
}
class filter_s001aThread1 extends Thread {
String tName = null;
class filter_s001aThread1 extends NamedTask {
public filter_s001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s001a.log1(" 'run': enter :: threadName == " + tName);
filter_s001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_s001aTestClass11()).m11();
} catch ( NullPointerException e) {
}
filter_s001a.log1(" 'run': exit :: threadName == " + tName);
filter_s001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
class filter_s001aThread2 extends Thread {
class filter_s001aThread2 extends NamedTask {
class filter_s001aTestClass20{
void m20() {
@ -204,20 +200,17 @@ class filter_s001aThread2 extends Thread {
}
}
String tName = null;
public filter_s001aThread2(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s001a.log1(" 'run': enter :: threadName == " + tName);
filter_s001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_s001aTestClass21()).m21();
} catch ( NullPointerException e) {
}
filter_s001a.log1(" 'run': exit :: threadName == " + tName);
filter_s001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addClassFilter_s;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter_s002a {
//====================================================== test program
static filter_s002aThread1 thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -96,7 +95,7 @@ public class filter_s002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new filter_s002aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new filter_s002aThread1("thread1"));
break;
//------------------------------------------------- standard end section
@ -161,22 +160,19 @@ class filter_s002aTestClass11 extends filter_s002aTestClass10{
}
}
class filter_s002aThread1 extends Thread {
String tName = null;
class filter_s002aThread1 extends NamedTask {
public filter_s002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s002a.log1(" 'run': enter :: threadName == " + tName);
filter_s002a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_s002aTestClass11()).m11();
} catch ( NullPointerException e) {
}
filter_s002a.log1(" 'run': exit :: threadName == " + tName);
filter_s002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,6 @@
package nsk.jdi.ExceptionRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -55,8 +54,8 @@ public class instancefilter001a {
//====================================================== test program
static instancefilter001aThread thread1 = null;
static instancefilter001aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static instancefilter001aTestClass objTC[] = { new instancefilter001aTestClass(), new instancefilter001aTestClass(), new instancefilter001aTestClass() };
@ -101,8 +100,8 @@ public class instancefilter001a {
case 0:
thread1 = new instancefilter001aThread("thread1");
thread2 = new instancefilter001aThread("thread2");
thread1 = JDIThreadFactory.newThread(new instancefilter001aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new instancefilter001aThread("thread2"));
break;
case 1:
@ -151,31 +150,29 @@ public class instancefilter001a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class instancefilter001aThread extends Thread {
static class instancefilter001aThread extends NamedTask {
String tName = null;
int tNumber;
public instancefilter001aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" objTC[tNumber].method(); :: threadName == " + tName + " tNumber == " + tNumber);
log1(" objTC[tNumber].method(); :: threadName == " + getName() + " tNumber == " + tNumber);
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -55,7 +55,7 @@ public class instancefilter002a {
//====================================================== test program
static instancefilter002aThread thread1 = null;
static Thread thread1 = null;
static instancefilter002aTestClass objTC[] = { new instancefilter002aTestClass(), new instancefilter002aTestClass() };
@ -100,7 +100,7 @@ public class instancefilter002a {
case 0:
thread1 = new instancefilter002aThread("thread1");
thread1 = JDIThreadFactory.newThread(new instancefilter002aThread("thread1"));
break;
//------------------------------------------------- standard end section
@ -141,19 +141,17 @@ public class instancefilter002a {
static class instancefilter002aThread extends Thread {
String tName = null;
int tNumber;
public instancefilter002aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -162,7 +160,7 @@ public class instancefilter002a {
}
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -25,7 +25,6 @@
package nsk.jdi.ExceptionRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -55,7 +54,7 @@ public class instancefilter003a {
//====================================================== test program
static instancefilter003aThread thread1 = null;
static Thread thread1 = null;
static instancefilter003aTestClass objTC[] = { new instancefilter003aTestClass(), new instancefilter003aTestClass() };
@ -100,7 +99,7 @@ public class instancefilter003a {
case 0:
thread1 = new instancefilter003aThread("thread1");
thread1 = JDIThreadFactory.newThread(new instancefilter003aThread("thread1"));
break;
//------------------------------------------------- standard end section
@ -139,21 +138,19 @@ public class instancefilter003a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class instancefilter003aThread extends Thread {
static class instancefilter003aThread extends NamedTask {
String tName = null;
int tNumber;
public instancefilter003aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -162,7 +159,7 @@ public class instancefilter003a {
}
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,6 @@
package nsk.jdi.ExceptionRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -55,8 +54,8 @@ public class instancefilter004a {
//====================================================== test program
static instancefilter004aThread thread1 = null;
static instancefilter004aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static instancefilter004aTestClass objTC[] = { new instancefilter004aTestClass(), new instancefilter004aTestClass() };
@ -100,8 +99,8 @@ public class instancefilter004a {
//------------------------------------------------------ section tested
case 0:
thread1 = new instancefilter004aThread("thread1");
thread2 = new instancefilter004aThread("thread2");
thread1 = JDIThreadFactory.newThread(new instancefilter004aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new instancefilter004aThread("thread2"));
break;
case 1:
@ -150,21 +149,19 @@ public class instancefilter004a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class instancefilter004aThread extends Thread {
static class instancefilter004aThread extends NamedTask {
String tName = null;
int tNumber;
public instancefilter004aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -173,7 +170,7 @@ public class instancefilter004a {
}
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class threadfilter001a {
//====================================================== test program
static threadfilter001aThread thread1 = null;
static threadfilter001aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static threadfilter001aTestClass objTC = new threadfilter001aTestClass();
@ -99,8 +98,8 @@ public class threadfilter001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new threadfilter001aThread("thread1");
thread2 = new threadfilter001aThread("thread2");
thread1 = JDIThreadFactory.newThread(new threadfilter001aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new threadfilter001aThread("thread2"));
break;
case 1:
@ -148,21 +147,19 @@ public class threadfilter001a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class threadfilter001aThread extends Thread {
static class threadfilter001aThread extends NamedTask {
String tName = null;
int tNumber;
public threadfilter001aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -171,7 +168,7 @@ public class threadfilter001a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class threadfilter002a {
//====================================================== test program
static threadfilter002aThread thread1 = null;
static Thread thread1 = null;
static threadfilter002aTestClass objTC = new threadfilter002aTestClass();
@ -98,7 +97,7 @@ public class threadfilter002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new threadfilter002aThread("thread1");
thread1 = JDIThreadFactory.newThread(new threadfilter002aThread("thread1"));
break;
//------------------------------------------------- standard end section
@ -136,21 +135,19 @@ public class threadfilter002a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class threadfilter002aThread extends Thread {
static class threadfilter002aThread extends NamedTask {
String tName = null;
int tNumber;
public threadfilter002aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -159,7 +156,7 @@ public class threadfilter002a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class threadfilter004a {
//====================================================== test program
static threadfilter004aThread thread1 = null;
static threadfilter004aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static threadfilter004aTestClass objTC = new threadfilter004aTestClass();
@ -99,8 +98,8 @@ public class threadfilter004a {
//------------------------------------------------------ section tested
case 0:
thread1 = new threadfilter004aThread("thread1");
thread2 = new threadfilter004aThread("thread2");
thread1 = JDIThreadFactory.newThread(new threadfilter004aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new threadfilter004aThread("thread2"));
break;
case 1:
@ -151,21 +150,19 @@ public class threadfilter004a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class threadfilter004aThread extends Thread {
static class threadfilter004aThread extends NamedTask {
String tName = null;
int tNumber;
public threadfilter004aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -174,7 +171,7 @@ public class threadfilter004a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.notifyCaught;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class notifycaught001a {
//====================================================== test program
static Thread1notifycaught001a thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -98,7 +97,7 @@ public class notifycaught001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1notifycaught001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1notifycaught001a("thread1"));
log1("new notifycaught001a().run1(thread1);");
new notifycaught001a().run1(thread1);
@ -160,22 +159,19 @@ class TestClass11 extends TestClass10{
}
}
class Thread1notifycaught001a extends Thread {
String tName = null;
class Thread1notifycaught001a extends NamedTask {
public Thread1notifycaught001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
notifycaught001a.log1(" 'run': enter :: threadName == " + tName);
notifycaught001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new TestClass11()).m11();
} catch ( NullPointerException e) {
}
notifycaught001a.log1(" 'run': exit :: threadName == " + tName);
notifycaught001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.ExceptionRequest.notifyUncaught;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class notifyuncaught001a {
//====================================================== test program
static Thread1notifyuncaught001a thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -98,7 +97,7 @@ public class notifyuncaught001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1notifyuncaught001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1notifyuncaught001a("thread1"));
log1("new notifyuncaught001a().run1(thread1);");
new notifyuncaught001a().run1(thread1);
@ -160,22 +159,19 @@ class TestClass11 extends TestClass10{
}
}
class Thread1notifyuncaught001a extends Thread {
String tName = null;
class Thread1notifyuncaught001a extends NamedTask {
public Thread1notifyuncaught001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
notifyuncaught001a.log1(" 'run': enter :: threadName == " + tName);
notifyuncaught001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new TestClass11()).m11();
} catch ( NullPointerException e) {
}
notifyuncaught001a.log1(" 'run': exit :: threadName == " + tName);
notifyuncaught001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,6 @@
package nsk.jdi.LocalVariable.isVisible;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
@ -94,8 +93,8 @@ public class isvisible001a {
//------------------------------------------------------ section tested
case 0:
Threadisvisible001a thread2 =
new Threadisvisible001a("Thread2");
Thread thread2 =
JDIThreadFactory.newThread(new Threadisvisible001a("Thread2"));
log1(" thread2 is created");
label:
@ -145,7 +144,7 @@ public class isvisible001a {
}
}
class Threadisvisible001a extends Thread {
class Threadisvisible001a extends NamedTask {
public Threadisvisible001a(String threadName) {
super(threadName);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,6 @@
package nsk.jdi.Locatable.location;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
@ -94,8 +93,8 @@ public class location004a {
//------------------------------------------------------ section tested
case 0:
Threadlocation004a thread2 =
new Threadlocation004a("Thread2");
Thread thread2 =
JDIThreadFactory.newThread(new Threadlocation004a("Thread2"));
log1(" thread2 is created");
label:
@ -145,7 +144,7 @@ public class location004a {
}
}
class Threadlocation004a extends Thread {
class Threadlocation004a extends NamedTask {
public Threadlocation004a(String threadName) {
super(threadName);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,6 @@
package nsk.jdi.Locatable.location;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
@ -94,8 +93,8 @@ public class location005a {
//------------------------------------------------------ section tested
case 0:
Threadlocation005a thread2 =
new Threadlocation005a("Thread2");
Thread thread2 =
JDIThreadFactory.newThread(new Threadlocation005a("Thread2"));
log1(" thread2 is created");
label:
@ -145,7 +144,7 @@ public class location005a {
}
}
class Threadlocation005a extends Thread {
class Threadlocation005a extends NamedTask {
public Threadlocation005a(String threadName) {
super(threadName);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.LocatableEvent.thread;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -107,9 +106,9 @@ public class thread001a {
case 0:
for (int n1 = 0; n1 < threadsN; n1++) {
if (n1 < threadsN-1)
threads[n1] = new Thread1thread001a(threadNames[n1]);
threads[n1] = JDIThreadFactory.newThread(new Thread1thread001a(threadNames[n1]));
else
threads[n1] = new Thread2thread001a(threadNames[n1]);
threads[n1] = JDIThreadFactory.newThread(new Thread2thread001a(threadNames[n1]));
}
log1(" threads has been created");
@ -174,7 +173,7 @@ public class thread001a {
static volatile int n = 0;
static class Thread1thread001a extends Thread {
static class Thread1thread001a extends NamedTask {
int threadIndex;
@ -205,7 +204,7 @@ public class thread001a {
}
static class Thread2thread001a extends Thread {
static class Thread2thread001a extends NamedTask {
int threadIndex;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addClassExclusionFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter001a {
//====================================================== test program
static Thread1filter001a thread1 = new Thread1filter001a("thread1");
static Thread thread1 = JDIThreadFactory.newThread(new Thread1filter001a("thread1"));
//------------------------------------------------------ common section
@ -140,7 +139,7 @@ public class filter001a {
}
}
class Thread1filter001a extends Thread {
class Thread1filter001a extends NamedTask {
class TestClass10{
void m10() {
@ -158,21 +157,17 @@ class Thread1filter001a extends Thread {
}
}
String tName = null;
public Thread1filter001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter001a.log1(" 'run': enter :: threadName == " + tName);
filter001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new TestClass11()).m11();
} catch ( NullPointerException e) {
}
filter001a.log1(" 'run': exit :: threadName == " + tName);
filter001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter_rt001a {
//====================================================== test program
static filter_rt001aThread1 thread1 = null;
static Thread thread1 = null;
static filter_rt001aTestClass10 obj10 = new filter_rt001aTestClass10();
static filter_rt001aTestClass11 obj11 = new filter_rt001aTestClass11();
@ -104,7 +103,7 @@ public class filter_rt001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new filter_rt001aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new filter_rt001aThread1("thread1"));
log1("new filter_rt001a().run1(thread1);");
new filter_rt001a().run1(thread1);
@ -159,20 +158,17 @@ class filter_rt001aTestClass11 extends filter_rt001aTestClass10{
}
}
class filter_rt001aThread1 extends Thread {
String tName = null;
class filter_rt001aThread1 extends NamedTask {
public filter_rt001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt001a.log1(" 'run': enter :: threadName == " + tName);
filter_rt001a.log1(" 'run': enter :: threadName == " + getName());
filter_rt001aTestClass21.m21();
filter_rt001aTestClass11.m11();
filter_rt001a.log1(" 'run': exit :: threadName == " + tName);
filter_rt001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -163,22 +162,19 @@ class filter_rt002aTestClass11 extends filter_rt002aTestClass10{
}
}
class filter_rt002aThread1 extends Thread {
String tName = null;
class filter_rt002aThread1 extends NamedTask {
public filter_rt002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt002a.log1(" 'run': enter :: threadName == " + tName);
filter_rt002a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_rt002aTestClass11()).m11();
} catch ( NullPointerException e) {
}
filter_rt002a.log1(" 'run': exit :: threadName == " + tName);
filter_rt002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class filter_rt003a {
//====================================================== test program
static filter_rt003aThread1 thread1 = null;
static filter_rt003aThread2 thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
//------------------------------------------------------ common section
@ -84,8 +83,8 @@ public class filter_rt003a {
filter_rt003aTestClass11 obj1 = new filter_rt003aTestClass11();
filter_rt003aTestClass21 obj2 = new filter_rt003aTestClass21();
thread1 = new filter_rt003aThread1("thread1");
thread2 = new filter_rt003aThread2("thread2");
thread1 = JDIThreadFactory.newThread(new filter_rt003aThread1("thread1"));
thread2 = JDIThreadFactory.newThread(new filter_rt003aThread2("thread2"));
log1("debuggee started!");
@ -163,20 +162,17 @@ class filter_rt003aTestClass11 extends filter_rt003aTestClass10{
}
}
class filter_rt003aThread1 extends Thread {
String tName = null;
class filter_rt003aThread1 extends NamedTask {
public filter_rt003aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt003a.log1(" 'run': enter :: threadName == " + tName);
filter_rt003a.log1(" 'run': enter :: threadName == " + getName());
filter_rt003aTestClass11.m11();
filter_rt003aTestClass21.m21();
filter_rt003a.log1(" 'run': exit :: threadName == " + tName);
filter_rt003a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
@ -193,19 +189,16 @@ class filter_rt003aTestClass21 extends filter_rt003aTestClass20{
}
}
class filter_rt003aThread2 extends Thread {
String tName = null;
class filter_rt003aThread2 extends NamedTask {
public filter_rt003aThread2(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt003a.log1(" 'run': enter :: threadName == " + tName);
filter_rt003a.log1(" 'run': enter :: threadName == " + getName());
filter_rt003aTestClass21.m21();
filter_rt003a.log1(" 'run': exit :: threadName == " + tName);
filter_rt003a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addClassFilter_s;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class filter_s001a {
//====================================================== test program
static Thread1filter_s001a thread1 = null;
static Thread2filter_s001a thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
//------------------------------------------------------ common section
@ -102,14 +101,14 @@ public class filter_s001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1filter_s001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1filter_s001a("thread1"));
log1("new filter_s001a().run1(thread1);");
new filter_s001a().run1(thread1);
break;
case 1:
thread2 = new Thread2filter_s001a("thread2");
thread2 = JDIThreadFactory.newThread(new Thread2filter_s001a("thread2"));
log1("new filter_s001a().run1(thread2);");
new filter_s001a().run1(thread2);
@ -162,36 +161,30 @@ class TestClass11 extends TestClass10{
}
}
class Thread1filter_s001a extends Thread {
String tName = null;
class Thread1filter_s001a extends NamedTask {
public Thread1filter_s001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s001a.log1(" 'run': enter :: threadName == " + tName);
filter_s001a.log1(" 'run': enter :: threadName == " + getName());
TestClass11.m11();
filter_s001a.log1(" 'run': exit :: threadName == " + tName);
filter_s001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}
class Thread2filter_s001a extends Thread {
String tName = null;
class Thread2filter_s001a extends NamedTask {
public Thread2filter_s001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_s001a.log1(" 'run': enter :: threadName == " + tName);
filter_s001a.log1(" 'run': enter :: threadName == " + getName());
TestClass21.m21();
filter_s001a.log1(" 'run': exit :: threadName == " + tName);
filter_s001a.log1(" 'run': exit :: threadName == " + getName());
return;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class instancefilter001a {
//====================================================== test program
static instancefilter001aThread thread1 = null;
static instancefilter001aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static instancefilter001aTestClass objTC[] = { new instancefilter001aTestClass(), new instancefilter001aTestClass(), new instancefilter001aTestClass() };
@ -83,8 +82,8 @@ public class instancefilter001a {
argHandler = new ArgumentHandler(argv);
log = argHandler.createDebugeeLog();
thread1 = new instancefilter001aThread("thread1");
thread2 = new instancefilter001aThread("thread2");
thread1 = JDIThreadFactory.newThread(new instancefilter001aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new instancefilter001aThread("thread2"));
log1("debuggee started!");
@ -148,31 +147,29 @@ public class instancefilter001a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class instancefilter001aThread extends Thread {
static class instancefilter001aThread extends NamedTask {
String tName = null;
int tNumber;
public instancefilter001aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" objTC[tNumber].method(); :: threadName == " + tName + " tNumber == " + tNumber);
log1(" objTC[tNumber].method(); :: threadName == " + getName() + " tNumber == " + tNumber);
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class instancefilter002a {
//====================================================== test program
static instancefilter002aThread thread1 = null;
static Thread thread1 = null;
static instancefilter002aTestClass objTC[] = { new instancefilter002aTestClass(), new instancefilter002aTestClass() };
@ -98,7 +97,7 @@ public class instancefilter002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new instancefilter002aThread("thread1");
thread1 = JDIThreadFactory.newThread(new instancefilter002aThread("thread1"));
break;
//------------------------------------------------- standard end section
@ -137,21 +136,19 @@ public class instancefilter002a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class instancefilter002aThread extends Thread {
static class instancefilter002aThread extends NamedTask {
String tName = null;
int tNumber;
public instancefilter002aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -160,7 +157,7 @@ public class instancefilter002a {
}
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class instancefilter003a {
//====================================================== test program
static instancefilter003aThread thread1 = null;
static Thread thread1 = null;
static instancefilter003aTestClass objTC[] = { new instancefilter003aTestClass(), new instancefilter003aTestClass() };
@ -98,7 +97,7 @@ public class instancefilter003a {
//------------------------------------------------------ section tested
case 0:
thread1 = new instancefilter003aThread("thread1");
thread1 = JDIThreadFactory.newThread(new instancefilter003aThread("thread1"));
break;
//------------------------------------------------- standard end section
@ -137,21 +136,19 @@ public class instancefilter003a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class instancefilter003aThread extends Thread {
static class instancefilter003aThread extends NamedTask {
String tName = null;
int tNumber;
public instancefilter003aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -160,7 +157,7 @@ public class instancefilter003a {
}
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addInstanceFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class instancefilter004a {
//====================================================== test program
static instancefilter004aThread thread1 = null;
static instancefilter004aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static instancefilter004aTestClass objTC[] = { new instancefilter004aTestClass(), new instancefilter004aTestClass(), new instancefilter004aTestClass() };
@ -83,8 +82,8 @@ public class instancefilter004a {
argHandler = new ArgumentHandler(argv);
log = argHandler.createDebugeeLog();
thread1 = new instancefilter004aThread("thread1");
thread2 = new instancefilter004aThread("thread2");
thread1 = JDIThreadFactory.newThread(new instancefilter004aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new instancefilter004aThread("thread2"));
log1("debuggee started!");
@ -147,31 +146,29 @@ public class instancefilter004a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class instancefilter004aThread extends Thread {
static class instancefilter004aThread extends NamedTask {
String tName = null;
int tNumber;
public instancefilter004aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
synchronized (waitnotifyObj) {
waitnotifyObj.notify();
}
log1(" objTC[tNumber].method(); :: threadName == " + tName + " tNumber == " + tNumber);
log1(" objTC[tNumber].method(); :: threadName == " + getName() + " tNumber == " + tNumber);
objTC[tNumber].method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class threadfilter001a {
//====================================================== test program
static threadfilter001aThread thread1 = null;
static threadfilter001aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static threadfilter001aTestClass objTC = new threadfilter001aTestClass();
@ -83,8 +82,8 @@ public class threadfilter001a {
argHandler = new ArgumentHandler(argv);
log = argHandler.createDebugeeLog();
thread1 = new threadfilter001aThread("thread1");
thread2 = new threadfilter001aThread("thread2");
thread1 = JDIThreadFactory.newThread(new threadfilter001aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new threadfilter001aThread("thread2"));
log1("debuggee started!");
@ -147,21 +146,19 @@ public class threadfilter001a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class threadfilter001aThread extends Thread {
static class threadfilter001aThread extends NamedTask {
String tName = null;
int tNumber;
public threadfilter001aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -170,7 +167,7 @@ public class threadfilter001a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class threadfilter002a {
//====================================================== test program
static threadfilter002aThread thread1 = null;
static Thread thread1 = null;
static threadfilter002aTestClass objTC = new threadfilter002aTestClass();
@ -98,7 +97,7 @@ public class threadfilter002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new threadfilter002aThread("thread1");
thread1 = JDIThreadFactory.newThread(new threadfilter002aThread("thread1"));
break;
//------------------------------------------------- standard end section
@ -136,21 +135,19 @@ public class threadfilter002a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class threadfilter002aThread extends Thread {
static class threadfilter002aThread extends NamedTask {
String tName = null;
int tNumber;
public threadfilter002aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -159,7 +156,7 @@ public class threadfilter002a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodEntryRequest.addThreadFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,8 +53,8 @@ public class threadfilter004a {
//====================================================== test program
static threadfilter004aThread thread1 = null;
static threadfilter004aThread thread2 = null;
static Thread thread1 = null;
static Thread thread2 = null;
static threadfilter004aTestClass objTC = new threadfilter004aTestClass();
@ -83,8 +82,8 @@ public class threadfilter004a {
argHandler = new ArgumentHandler(argv);
log = argHandler.createDebugeeLog();
thread1 = new threadfilter004aThread("thread1");
thread2 = new threadfilter004aThread("thread2");
thread1 = JDIThreadFactory.newThread(new threadfilter004aThread("thread1"));
thread2 = JDIThreadFactory.newThread(new threadfilter004aThread("thread2"));
log1("debuggee started!");
@ -148,21 +147,19 @@ public class threadfilter004a {
static Object lockingObj[] = new Object[2];
static volatile int number = 0;
static class threadfilter004aThread extends Thread {
static class threadfilter004aThread extends NamedTask {
String tName = null;
int tNumber;
public threadfilter004aThread(String threadName) {
super(threadName);
tName = threadName;
tNumber = number;
number++;
lockingObj[tNumber] = threadName;
}
public void run() {
log1(" 'run': enter :: threadName == " + tName);
log1(" 'run': enter :: threadName == " + getName());
if (lockingObj[tNumber] == null)
log1("lockingObj[tNumber] == null");
synchronized(lockingObj[tNumber]) {
@ -171,7 +168,7 @@ public class threadfilter004a {
}
objTC.method();
}
log1(" 'run': exit :: threadName == " + tName);
log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodExitRequest.addClassExclusionFilter;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter001a {
//====================================================== test program
static Thread1filter001a thread1 = null;
static Thread thread1 = null;
//------------------------------------------------------ common section
@ -101,7 +100,7 @@ public class filter001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new Thread1filter001a("thread1");
thread1 = JDIThreadFactory.newThread(new Thread1filter001a("thread1"));
log1("new filter001a().run1(thread1);");
new filter001a().run1(thread1);
@ -142,7 +141,7 @@ public class filter001a {
}
}
class Thread1filter001a extends Thread {
class Thread1filter001a extends NamedTask {
class TestClass10{
void m10() {
@ -160,21 +159,17 @@ class Thread1filter001a extends Thread {
}
}
String tName = null;
public Thread1filter001a(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter001a.log1(" 'run': enter :: threadName == " + tName);
filter001a.log1(" 'run': enter :: threadName == " + getName());
try {
(new TestClass11()).m11();
} catch ( NullPointerException e) {
}
filter001a.log1(" 'run': exit :: threadName == " + tName);
filter001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodExitRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter_rt001a {
//====================================================== test program
static filter_rt001aThread1 thread1 = null;
static Thread thread1 = null;
// static Thread2filter_rt001a thread2 = null;
static filter_rt001aTestClass10 obj10 = new filter_rt001aTestClass10();
@ -105,8 +104,7 @@ public class filter_rt001a {
//------------------------------------------------------ section tested
case 0:
thread1 = new filter_rt001aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new filter_rt001aThread1("thread1"));
log1("new filter_rt001a().run1(thread1);");
new filter_rt001a().run1(thread1);
@ -160,20 +158,17 @@ class filter_rt001aTestClass11 extends filter_rt001aTestClass10{
}
}
class filter_rt001aThread1 extends Thread {
String tName = null;
class filter_rt001aThread1 extends NamedTask {
public filter_rt001aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt001a.log1(" 'run': enter :: threadName == " + tName);
filter_rt001a.log1(" 'run': enter :: threadName == " + getName());
filter_rt001aTestClass21.m21();
filter_rt001aTestClass11.m11();
filter_rt001a.log1(" 'run': exit :: threadName == " + tName);
filter_rt001a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
package nsk.jdi.MethodExitRequest.addClassFilter_rt;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
@ -54,7 +53,7 @@ public class filter_rt002a {
//====================================================== test program
static filter_rt002aThread1 thread1 = null;
static Thread thread1 = null;
static filter_rt002aTestClass10 obj = new filter_rt002aTestClass10();
@ -98,7 +97,7 @@ public class filter_rt002a {
//------------------------------------------------------ section tested
case 0:
thread1 = new filter_rt002aThread1("thread1");
thread1 = JDIThreadFactory.newThread(new filter_rt002aThread1("thread1"));
break;
//------------------------------------------------- standard end section
@ -163,22 +162,19 @@ class filter_rt002aTestClass11 extends filter_rt002aTestClass10{
}
}
class filter_rt002aThread1 extends Thread {
String tName = null;
class filter_rt002aThread1 extends NamedTask {
public filter_rt002aThread1(String threadName) {
super(threadName);
tName = threadName;
}
public void run() {
filter_rt002a.log1(" 'run': enter :: threadName == " + tName);
filter_rt002a.log1(" 'run': enter :: threadName == " + getName());
try {
(new filter_rt002aTestClass11()).m11();
} catch ( NullPointerException e) {
}
filter_rt002a.log1(" 'run': exit :: threadName == " + tName);
filter_rt002a.log1(" 'run': exit :: threadName == " + getName());
return;
}
}

Some files were not shown because too many files have changed in this diff Show More