@@ -185,7 +185,13 @@ public final int getMaxPriority() {
185
185
* @return {@code true} if this thread group is a daemon thread group;
186
186
* {@code false} otherwise.
187
187
* @since 1.0
188
+ *
189
+ * @deprecated The API and mechanism for destroying a ThreadGroup is inherently
190
+ * flawed. The ability to explicitly or automatically destroy a
191
+ * thread group, and the concept of daemon thread group, will be
192
+ * removed in a future release.
188
193
*/
194
+ @ Deprecated (since ="16" , forRemoval =true )
189
195
public final boolean isDaemon () {
190
196
return daemon ;
191
197
}
@@ -195,7 +201,12 @@ public final boolean isDaemon() {
195
201
*
196
202
* @return true if this object is destroyed
197
203
* @since 1.1
204
+ *
205
+ * @deprecated The API and mechanism for destroying a ThreadGroup is inherently
206
+ * flawed. The ability to explicitly or automatically destroy a
207
+ * thread group will be removed in a future release.
198
208
*/
209
+ @ Deprecated (since ="16" , forRemoval =true )
199
210
public synchronized boolean isDestroyed () {
200
211
return destroyed ;
201
212
}
@@ -217,7 +228,13 @@ public synchronized boolean isDestroyed() {
217
228
* @see java.lang.SecurityException
218
229
* @see java.lang.ThreadGroup#checkAccess()
219
230
* @since 1.0
231
+ *
232
+ * @deprecated The API and mechanism for destroying a ThreadGroup is inherently
233
+ * flawed. The ability to explicitly or automatically destroy a
234
+ * thread group, and the concept of daemon thread group, will be
235
+ * removed in a future release.
220
236
*/
237
+ @ Deprecated (since ="16" , forRemoval =true )
221
238
public final void setDaemon (boolean daemon ) {
222
239
checkAccess ();
223
240
this .daemon = daemon ;
@@ -602,7 +619,7 @@ private int enumerate(ThreadGroup list[], int n, boolean recurse) {
602
619
* @deprecated This method is inherently unsafe. See
603
620
* {@link Thread#stop} for details.
604
621
*/
605
- @ Deprecated (since ="1.2" )
622
+ @ Deprecated (since ="1.2" , forRemoval = true )
606
623
public final void stop () {
607
624
if (stopOrSuspend (false ))
608
625
Thread .currentThread ().stop ();
@@ -763,7 +780,12 @@ public final void resume() {
763
780
* thread group.
764
781
* @see java.lang.ThreadGroup#checkAccess()
765
782
* @since 1.0
783
+ *
784
+ * @deprecated The API and mechanism for destroying a ThreadGroup is inherently
785
+ * flawed. The ability to explicitly or automatically destroy a
786
+ * thread group will be removed in a future release.
766
787
*/
788
+ @ Deprecated (since ="16" , forRemoval =true )
767
789
public final void destroy () {
768
790
int ngroupsSnapshot ;
769
791
ThreadGroup [] groupsSnapshot ;
0 commit comments