8355221: Get rid of unnecessary override of JDIBase.breakpointForCommunication in nsk/jdi tests

Reviewed-by: lmesnik, amenkov
This commit is contained in:
Chris Plummer 2025-04-24 17:19:15 +00:00
parent 29f10700e7
commit 370e6113de
7 changed files with 7 additions and 176 deletions

View File

@ -311,7 +311,7 @@ public class filter003 extends JDIBase {
vm.resume();
breakpointForCommunication();
breakpointForCommunication(debuggeeName);
int instruction = ((IntegerValue)
(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();
@ -327,30 +327,6 @@ public class filter003 extends JDIBase {
return;
}
protected void breakpointForCommunication()
throws JDITestRuntimeException {
log2("breakpointForCommunication");
do {
getEventSet();
Event event = eventIterator.nextEvent();
if (event instanceof BreakpointEvent)
return;
log2(" received: " + event);
if (EventFilters.filtered(event, debuggeeName)) {
eventSet.resume();
}
else {
break;
}
} while (true);
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
}
// ============================== test's additional methods
private ClassPrepareRequest setting22ClassPrepareRequest ( String testedClass,

View File

@ -264,7 +264,7 @@ public class filter_rt002 extends JDIBase {
for (int i = 0; ; i++) {
vm.resume();
breakpointForCommunication();
breakpointForCommunication(debuggeeName);
int instruction = ((IntegerValue)
(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();
@ -334,30 +334,6 @@ public class filter_rt002 extends JDIBase {
return;
}
protected void breakpointForCommunication()
throws JDITestRuntimeException {
log2("breakpointForCommunication");
do {
getEventSet();
Event event = eventIterator.nextEvent();
if (event instanceof BreakpointEvent)
return;
log2(" received: " + event);
if (EventFilters.filtered(event, debuggeeName)) {
eventSet.resume();
}
else {
break;
}
} while (true);
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
}
// ============================== test's additional methods
private ClassPrepareRequest setting21ClassPrepareRequest ( ReferenceType testedClass,

View File

@ -267,7 +267,7 @@ public class filter_s002 extends JDIBase {
for (int i = 0; ; i++) {
vm.resume();
breakpointForCommunication();
breakpointForCommunication(debuggeeName);
int instruction = ((IntegerValue)
(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();
@ -332,29 +332,6 @@ public class filter_s002 extends JDIBase {
log1(" TESTING ENDS");
return;
}
protected void breakpointForCommunication()
throws JDITestRuntimeException {
log2("breakpointForCommunication");
do {
getEventSet();
Event event = eventIterator.nextEvent();
if (event instanceof BreakpointEvent)
return;
log2(" received: " + event);
if (EventFilters.filtered(event, debuggeeName)) {
eventSet.resume();
}
else {
break;
}
} while (true);
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
}
// ============================== test's additional methods

View File

@ -260,7 +260,7 @@ public class clsprepreq002 extends JDIBase {
for (int i = 0; ; i++) {
vm.resume();
breakpointForCommunication();
breakpointForCommunication(debuggeeName);
int instruction = ((IntegerValue)
(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();
@ -366,28 +366,4 @@ public class clsprepreq002 extends JDIBase {
return;
}
protected void breakpointForCommunication()
throws JDITestRuntimeException {
log2("breakpointForCommunication");
do {
getEventSet();
Event event = eventIterator.nextEvent();
if (event instanceof BreakpointEvent)
return;
log2(" received: " + event);
if (EventFilters.filtered(event, debuggeeName)) {
eventSet.resume();
}
else {
break;
}
} while (true);
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
}
}

View File

@ -259,7 +259,7 @@ public class methexitreq002 extends JDIBase {
for (int i = 0; ; i++) {
vm.resume();
breakpointForCommunication();
breakpointForCommunication(debuggeeName);
int instruction = ((IntegerValue)
(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();
@ -360,28 +360,4 @@ public class methexitreq002 extends JDIBase {
return;
}
protected void breakpointForCommunication()
throws JDITestRuntimeException {
log2("breakpointForCommunication");
do {
getEventSet();
Event event = eventIterator.nextEvent();
if (event instanceof BreakpointEvent)
return;
log2(" received: " + event);
if (EventFilters.filtered(event, debuggeeName)) {
eventSet.resume();
}
else {
break;
}
} while (true);
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
}
}

View File

@ -263,7 +263,7 @@ public class filter002 extends JDIBase {
for (int i = 0; ; i++) {
vm.resume();
breakpointForCommunication();
breakpointForCommunication(debuggeeName);
int instruction = ((IntegerValue)
(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();
@ -331,32 +331,6 @@ public class filter002 extends JDIBase {
return;
}
protected void breakpointForCommunication()
throws JDITestRuntimeException {
log2("breakpointForCommunication");
do {
getEventSet();
Event event = eventIterator.nextEvent();
if (event instanceof BreakpointEvent)
return;
log2(" received: " + event);
if (EventFilters.filtered(event, debuggeeName)) {
eventSet.resume();
}
else {
break;
}
} while (true);
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
}
// ============================== test's additional methods
private MethodEntryRequest setting23MethodEntryRequest ( ThreadReference thread,

View File

@ -263,7 +263,7 @@ public class filter002 extends JDIBase {
for (int i = 0; ; i++) {
vm.resume();
breakpointForCommunication();
breakpointForCommunication(debuggeeName);
int instruction = ((IntegerValue)
(debuggeeClass.getValue(debuggeeClass.fieldByName("instruction")))).value();
@ -331,30 +331,6 @@ public class filter002 extends JDIBase {
return;
}
protected void breakpointForCommunication()
throws JDITestRuntimeException {
log2("breakpointForCommunication");
do {
getEventSet();
Event event = eventIterator.nextEvent();
if (event instanceof BreakpointEvent)
return;
log2(" received: " + event);
if (EventFilters.filtered(event, debuggeeName)) {
eventSet.resume();
}
else {
break;
}
} while (true);
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
}
// ============================== test's additional methods
private MethodExitRequest setting23MethodExitRequest ( ThreadReference thread,