Skip to content

Commit 8e53520

Browse files
committed
Fix thread and threadgroup tests in compile stage
- These files will be excluded in build.xml instead Signed-off-by: LongyuZhang <[email protected]>
1 parent 935650c commit 8e53520

File tree

2 files changed

+1
-72
lines changed

2 files changed

+1
-72
lines changed

src/java.base/share/classes/java/lang/Thread.java

-38
Original file line numberDiff line numberDiff line change
@@ -1831,44 +1831,6 @@ boolean alive() {
18311831
return eetop != NO_REF;
18321832
}
18331833

1834-
/**
1835-
* Throws {@code UnsupportedOperationException}.
1836-
*
1837-
* @throws UnsupportedOperationException always
1838-
*
1839-
* @deprecated This method was originally specified to suspend a thread.
1840-
* It was inherently deadlock-prone. If the target thread held a lock on
1841-
* a monitor protecting a critical system resource when it was suspended,
1842-
* no thread could access the resource until the target thread was resumed.
1843-
* If the thread intending to resume the target thread attempted to lock
1844-
* the monitor prior to calling {@code resume}, deadlock would result.
1845-
* Such deadlocks typically manifested themselves as "frozen" processes.
1846-
* For more information, see
1847-
* <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
1848-
* are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
1849-
*/
1850-
@Deprecated(since="1.2", forRemoval=true)
1851-
public final void suspend() {
1852-
throw new UnsupportedOperationException();
1853-
}
1854-
1855-
/**
1856-
* Throws {@code UnsupportedOperationException}.
1857-
*
1858-
* @throws UnsupportedOperationException always
1859-
*
1860-
* @deprecated This method was originally specified to resume a thread
1861-
* suspended with {@link #suspend()}. Suspending a thread was
1862-
* inherently deadlock-prone.
1863-
* For more information, see
1864-
* <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
1865-
* are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
1866-
*/
1867-
@Deprecated(since="1.2", forRemoval=true)
1868-
public final void resume() {
1869-
throw new UnsupportedOperationException();
1870-
}
1871-
18721834
/**
18731835
* Changes the priority of this thread.
18741836
*

src/java.base/share/classes/java/lang/ThreadGroup.java

+1-34
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -555,17 +555,6 @@ private int enumerate(ThreadGroup[] list, int i, boolean recurse) {
555555
return i;
556556
}
557557

558-
/**
559-
* Throws {@code UnsupportedOperationException}.
560-
*
561-
* @deprecated This method was originally specified to stop all threads in
562-
* the thread group. It was inherently unsafe.
563-
*/
564-
@Deprecated(since="1.2", forRemoval=true)
565-
public final void stop() {
566-
throw new UnsupportedOperationException();
567-
}
568-
569558
/**
570559
* Interrupts all {@linkplain Thread#isAlive() live} platform threads in
571560
* this thread group and its subgroups.
@@ -588,28 +577,6 @@ public final void interrupt() {
588577
}
589578
}
590579

591-
/**
592-
* Throws {@code UnsupportedOperationException}.
593-
*
594-
* @deprecated This method was originally specified to suspend all threads
595-
* in the thread group.
596-
*/
597-
@Deprecated(since="1.2", forRemoval=true)
598-
public final void suspend() {
599-
throw new UnsupportedOperationException();
600-
}
601-
602-
/**
603-
* Throws {@code UnsupportedOperationException}.
604-
*
605-
* @deprecated This method was originally specified to resume all threads
606-
* in the thread group.
607-
*/
608-
@Deprecated(since="1.2", forRemoval=true)
609-
public final void resume() {
610-
throw new UnsupportedOperationException();
611-
}
612-
613580
/**
614581
* Does nothing.
615582
*

0 commit comments

Comments
 (0)