Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -173,6 +173,7 @@ private int runThis (String argv[], PrintStream out) {
}

VirtualMachine vm = debuggee.VM();
ReferenceType debuggeeClass = debuggee.classByName(debuggeeName);

//------------------------------------------------------ testing section
log1(" TESTING BEGINS");
Expand Down Expand Up @@ -209,9 +210,6 @@ private int runThis (String argv[], PrintStream out) {
//String bpLine2 = "breakpointLineNumber2";
//String bpLine3 = "breakpointLineNumber3";


List allThreads = null;
ListIterator listIterator = null;
List classes = null;

BreakpointRequest breakpRequest1 = null;
Expand All @@ -231,7 +229,6 @@ private int runThis (String argv[], PrintStream out) {

log2("getting ThreadReference object");
try {
allThreads = vm.allThreads();
classes = vm.classesByName(testedClassName);
testedclass = (ReferenceType) classes.get(0);
classType = (ClassType) testedclass;
Expand All @@ -241,7 +238,7 @@ private int runThis (String argv[], PrintStream out) {
break label0;
}

thread2 = debuggee.threadByName(threadName);
thread2 = debuggee.threadByFieldNameOrThrow(debuggeeClass, "test_thread", threadName);

log2("setting up a breakpoint");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -59,6 +59,8 @@ private static void logErr(String message) {

//====================================================== test program

static Thread test_thread = null;

// String mName = //!!!!!!!!!!!!!!!!!!!!!!
// "nsk.jdi.ClassType.invokeMethod";

Expand Down Expand Up @@ -98,8 +100,8 @@ public static void main (String argv[]) {
//------------------------------------------------------ section tested

case 0:
Thread test_thread =
JDIThreadFactory.newThread(new Threadinvokemethod001a("testedThread"));
test_thread =
JDIThreadFactory.newThread(new Threadinvokemethod001a("testedThread"));
log1(" thread2 is created");

label:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -184,6 +184,7 @@ private int runThis (String argv[], PrintStream out) {
}

vm = debuggee.VM();
ReferenceType debuggeeClass = debuggee.classByName(debuggeeName);

//------------------------------------------------------ testing section
log1(" TESTING BEGINS");
Expand Down Expand Up @@ -216,8 +217,6 @@ private int runThis (String argv[], PrintStream out) {

String bpLine1 = "breakpointLineNumber1";

List allThreads = null;
ListIterator listIterator = null;
List classes = null;

BreakpointRequest breakpRequest1 = null;
Expand All @@ -228,7 +227,6 @@ private int runThis (String argv[], PrintStream out) {

log2("getting ThreadReference object");
try {
allThreads = vm.allThreads();
classes = vm.classesByName(threadClassName);
threadClass = (ReferenceType) classes.get(0);
} catch ( Exception e) {
Expand All @@ -237,21 +235,7 @@ private int runThis (String argv[], PrintStream out) {
break label0;
}


log2("......getting Thread thread2 - 1-st argument");
listIterator = allThreads.listIterator();
for (;;) {
try {
thread2 = (ThreadReference) listIterator.next();
if (thread2.name().equals(threadName))
break ;
} catch ( NoSuchElementException e ) {
log3("ERROR: NoSuchElementException for listIterator.next()");
log3("ERROR: NO THREAD2 ?????????!!!!!!!");
expresult = returnCode1;
break label0;
}
}
thread2 = debuggee.threadByFieldNameOrThrow(debuggeeClass, "test_thread", threadName);

log2("setting up a breakpoint");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -59,6 +59,7 @@ private static void logErr(String message) {

//====================================================== test program

static Thread test_thread = null;
static TestClass obj = new TestClass();

//---------------------------------------------------- main method
Expand Down Expand Up @@ -96,8 +97,8 @@ public static void main (String argv[]) {
//------------------------------------------------------ section tested

case 0:
Thread test_thread =
JDIThreadFactory.newThread(new Threadnewinstance001a("testedThread"));
test_thread =
JDIThreadFactory.newThread(new Threadnewinstance001a("testedThread"));
log1(" thread2 is created");

label:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -181,6 +181,7 @@ private int runThis (String argv[], PrintStream out) {
}

vm = debuggee.VM();
ReferenceType debuggeeClass = debuggee.classByName(debuggeeName);

//------------------------------------------------------ testing section
log1(" TESTING BEGINS");
Expand Down Expand Up @@ -213,8 +214,6 @@ private int runThis (String argv[], PrintStream out) {

String bpLine1 = "breakpointLineNumber1";

List allThreads = null;
ListIterator listIterator = null;
List classes = null;

BreakpointRequest breakpRequest1 = null;
Expand All @@ -225,7 +224,6 @@ private int runThis (String argv[], PrintStream out) {

log2("getting ThreadReference object");
try {
allThreads = vm.allThreads();
classes = vm.classesByName(threadClassName);
threadClass = (ReferenceType) classes.get(0);
} catch ( Exception e) {
Expand All @@ -234,20 +232,7 @@ private int runThis (String argv[], PrintStream out) {
break label0;
}


listIterator = allThreads.listIterator();
for (;;) {
try {
thread2 = (ThreadReference) listIterator.next();
if (thread2.name().equals(threadName))
break ;
} catch ( NoSuchElementException e ) {
log3("ERROR: NoSuchElementException for listIterator.next()");
log3("ERROR: NO THREAD2 ?????????!!!!!!!");
expresult = returnCode1;
break label0;
}
}
thread2 = debuggee.threadByFieldNameOrThrow(debuggeeClass, "test_thread", threadName);

log2("setting up a breakpoint");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -60,6 +60,7 @@ private static void logErr(String message) {

//====================================================== test program

static Threadnewinstance002a test_thread = null;
// static TestClass obj = new TestClass();

//---------------------------------------------------- main method
Expand Down Expand Up @@ -97,7 +98,7 @@ public static void main (String argv[]) {
//------------------------------------------------------ section tested

case 0:
Threadnewinstance002a test_thread =
test_thread =
new Threadnewinstance002a("testedThread");
log1(" thread2 is created");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -168,6 +168,7 @@ private int runThis (String argv[], PrintStream out) {
}

vm = debuggee.VM();
ReferenceType debuggeeClass = debuggee.classByName(debuggeeName);

//------------------------------------------------------ testing section
log1(" TESTING BEGINS");
Expand Down Expand Up @@ -199,8 +200,6 @@ private int runThis (String argv[], PrintStream out) {
String breakpointMethod1 = "runt1";
String bpLine1 = "breakpointLineNumber1";

List allThreads = null;
ListIterator listIterator = null;
List classes = null;

BreakpointRequest breakpRequest1 = null;
Expand All @@ -211,7 +210,6 @@ private int runThis (String argv[], PrintStream out) {

log2("getting ThreadReference object");
try {
allThreads = vm.allThreads();
classes = vm.classesByName(testedClassName);
testedClass = (ReferenceType) classes.get(0);
} catch ( Exception e) {
Expand All @@ -220,19 +218,7 @@ private int runThis (String argv[], PrintStream out) {
break label0;
}

listIterator = allThreads.listIterator();
for (;;) {
try {
thread2 = (ThreadReference) listIterator.next();
if (thread2.name().equals(threadName))
break ;
} catch ( NoSuchElementException e ) {
log3("ERROR: NoSuchElementException for listIterator.next()");
log3("ERROR: NO THREAD2 ?????????!!!!!!!");
expresult = returnCode1;
break label0;
}
}
thread2 = debuggee.threadByFieldNameOrThrow(debuggeeClass, "test_thread", threadName);

log2("setting up a breakpoint");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -58,6 +58,9 @@ private static void logErr(String message) {
}

//====================================================== test program

static Thread test_thread = null;

//---------------------------------------------------- main method

public static void main (String argv[]) {
Expand Down Expand Up @@ -93,8 +96,8 @@ public static void main (String argv[]) {
//------------------------------------------------------ section tested

case 0:
Thread test_thread =
JDIThreadFactory.newThread(new Threadgetvalue001a("testedThread"));
test_thread =
JDIThreadFactory.newThread(new Threadgetvalue001a("testedThread"));
log1(" thread2 is created");

label:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -172,6 +172,7 @@ private int runThis (String argv[], PrintStream out) {
}

vm = debuggee.VM();
ReferenceType debuggeeClass = debuggee.classByName(debuggeeName);

//------------------------------------------------------ testing section
log1(" TESTING BEGINS");
Expand Down Expand Up @@ -204,8 +205,6 @@ private int runThis (String argv[], PrintStream out) {

String bpLine1 = "breakpointLineNumber1";

List allThreads = null;
ListIterator listIterator = null;
List classes = null;

BreakpointRequest breakpRequest1 = null;
Expand All @@ -216,7 +215,6 @@ private int runThis (String argv[], PrintStream out) {

log2("getting ThreadReference object");
try {
allThreads = vm.allThreads();
classes = vm.classesByName(threadClassName);
threadClass = (ReferenceType) classes.get(0);
} catch ( Exception e) {
Expand All @@ -225,21 +223,7 @@ private int runThis (String argv[], PrintStream out) {
break label0;
}


log2("......getting Thread thread2 - 1-st argument");
listIterator = allThreads.listIterator();
for (;;) {
try {
thread2 = (ThreadReference) listIterator.next();
if (thread2.name().equals(threadName))
break ;
} catch ( NoSuchElementException e ) {
log3("ERROR: NoSuchElementException for listIterator.next()");
log3("ERROR: NO THREAD2 ?????????!!!!!!!");
expresult = returnCode1;
break label0;
}
}
thread2 = debuggee.threadByFieldNameOrThrow(debuggeeClass, "test_thread", threadName);

log2("setting up a breakpoint");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -60,6 +60,7 @@ private static void logErr(String message) {

//====================================================== test program

static getvalue002aThread test_thread = null;
static getvalue002aTestClass obj = new getvalue002aTestClass();

//---------------------------------------------------- main method
Expand Down Expand Up @@ -97,8 +98,7 @@ public static void main (String argv[]) {
//------------------------------------------------------ section tested

case 0:
getvalue002aThread test_thread =
new getvalue002aThread("testedThread");
test_thread = new getvalue002aThread("testedThread");
log1(" thread2 is created");

label:
Expand Down
Loading