Skip to content

Commit a539b85

Browse files
committed
fix jcheck errors
1 parent df79cbe commit a539b85

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Debugee.java

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ public ThreadReference threadByNameOrThrow(String name) throws JDITestRuntimeExc
270270
public ThreadReference threadByFieldNameOrThrow(ReferenceType debuggeeClass,
271271
String threadFieldName)
272272
throws JDITestRuntimeException {
273-
273+
274274
Field field = debuggeeClass.fieldByName(threadFieldName);
275275
if (field == null) {
276276
throw new JDITestRuntimeException("** Thread field not found ** : "
277277
+ threadFieldName);
278278
}
279-
279+
280280
ThreadReference thread = (ThreadReference)debuggeeClass.getValue(field);
281281
if (thread == null) {
282282
throw new JDITestRuntimeException("** Thread field is null ** : "
@@ -287,23 +287,8 @@ public ThreadReference threadByFieldNameOrThrow(ReferenceType debuggeeClass,
287287
throw new JDITestRuntimeException("** Thread names do not match ** : "
288288
+ threadFieldName + " vs. " + thread.name());
289289
}
290-
291-
return thread;
292-
}
293290

294-
public void setMainThread(ThreadReference thread) {
295-
String threadName = thread.name();
296-
if (!threadName.equals("main")) {
297-
throw new TestBug("Thread is not \"main\" thread: " + threadName);
298-
}
299-
mainThread = thread;
300-
}
301-
302-
public ThreadReference mainThread() {
303-
if (mainThread == null) {
304-
throw new JDITestRuntimeException("** mainThrad has not been set **");
305-
}
306-
return mainThread;
291+
return thread;
307292
}
308293

309294
// --------------------------------------------------- //

0 commit comments

Comments
 (0)