Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2153338 | OpenJDK6 | Chris Hegarty | P3 | Resolved | Fixed | b01 |
Name: boT120536 Date: 01/12/2001
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
The specification for Thread.setDaemon says:
"This method must be called before the thread is started. "
However the implementation uses isAlive() to determine whether or not the
thread has been started. This means that when the thread has terminated isAlive
() returns false and setDaemon is allowed to proceed *after* the thread has
started. Obviously this has no practical consequences - except in pedantic
compliance tests.
This is very minor but should be fixed as part of the general thread tidy up
alluded to in various bug evaluations. The simplest fix is probably to the
specification.
(Review ID: 115025)
======================================================================
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
The specification for Thread.setDaemon says:
"This method must be called before the thread is started. "
However the implementation uses isAlive() to determine whether or not the
thread has been started. This means that when the thread has terminated isAlive
() returns false and setDaemon is allowed to proceed *after* the thread has
started. Obviously this has no practical consequences - except in pedantic
compliance tests.
This is very minor but should be fixed as part of the general thread tidy up
alluded to in various bug evaluations. The simplest fix is probably to the
specification.
(Review ID: 115025)
======================================================================
- backported by
-
JDK-2153338 (spec thread) Thread.setDaemon() should not be allowed after the thread terminates
- Resolved
- relates to
-
JDK-4189292 (thread spec) ThreadGroup and Thread need better and tighter specs
- Closed